diff src/stdio/stdio.c @ 1228:01efa0e5b554

file->handle should be cleared on close, otherwise it can lead to double free.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 10 Jul 2007 14:21:15 +0900
parents 9bfa9705addf
children 761e17b23e0c
line wrap: on
line diff
--- a/src/stdio/stdio.c	Mon Jul 09 08:09:21 2007 -0500
+++ b/src/stdio/stdio.c	Tue Jul 10 14:21:15 2007 +0900
@@ -111,6 +111,7 @@
 
         if (fclose(handle) != 0)
             ret = -1;
+        file->handle = NULL;
     }
 
     return ret;