[m-rev.] diff: fix file descriptor leak

Simon Taylor stayl at cs.mu.OZ.AU
Fri Jun 14 17:43:15 AEST 2002


Estimated hours taken: 0.5
Branches: main

compiler/passes_aux.m:
	Fix a file descriptor leak.

Index: passes_aux.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/passes_aux.m,v
retrieving revision 1.44
diff -u -u -r1.44 passes_aux.m
--- passes_aux.m	20 Mar 2002 12:59:37 -0000	1.44
+++ passes_aux.m	14 Jun 2002 07:22:49 -0000
@@ -523,7 +523,8 @@
 			report_error(ErrorStream,
 				"error reading command output: "
 					++ io__error_message(TmpFileReadError))
-		)
+		),
+		io__close_input(TmpFileStream)
 	;
 		{ TmpFileRes = error(TmpFileError) },
 		report_error(ErrorStream, "error opening command output: "
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list