Commit 86887094 authored by pfdietz's avatar pfdietz
Browse files

Fix leakage of open streams

parent 02c37306
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -51,8 +51,10 @@
	unless (let ((s (open "foo.txt"
			      :direction :input
			      :element-type `(unsigned-byte ,i))))
		 (prog1
		   (and (eql (setq b1 (read-byte s)) (1- (ash 1 i)))
		      (eql (setq b2 (read-byte s)) 1)))
			(eql (setq b2 (read-byte s)) 1))
		   (close s)))
	collect (list i b1 b2))
  nil)

@@ -70,8 +72,10 @@
	unless (let ((s (open "foo.txt"
			      :direction :input
			      :element-type `(unsigned-byte ,i))))
		 (prog1
		     (and (eql (setq b1 (read-byte s)) (1- (ash 1 i)))
		      (eql (setq b2 (read-byte s)) 1)))
			  (eql (setq b2 (read-byte s)) 1))
		   (close s)))
	collect (list i b1 b2))
  nil)