Mercurial > audlegacy-plugins
comparison 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 |
comparison
equal
deleted
inserted
replaced
1227:7a081f2998d0 | 1228:01efa0e5b554 |
---|---|
109 { | 109 { |
110 FILE *handle = (FILE *) file->handle; | 110 FILE *handle = (FILE *) file->handle; |
111 | 111 |
112 if (fclose(handle) != 0) | 112 if (fclose(handle) != 0) |
113 ret = -1; | 113 ret = -1; |
114 file->handle = NULL; | |
114 } | 115 } |
115 | 116 |
116 return ret; | 117 return ret; |
117 } | 118 } |
118 | 119 |