diff options
author | Dmitri Pal <dpal@redhat.com> | 2010-12-26 21:24:08 -0500 |
---|---|---|
committer | Dmitri Pal <dpal@redhat.com> | 2011-01-03 15:00:43 -0500 |
commit | c4d2383282b898f4c5914bf720301cdcabf5eb51 (patch) | |
tree | a6e90fe7187fe6237d6813ee32be0b8acb412c69 | |
parent | 87be7cfc4b8cc143a582a38a0d024e166d91df35 (diff) | |
download | ding-libs-c4d2383282b898f4c5914bf720301cdcabf5eb51.tar.gz ding-libs-c4d2383282b898f4c5914bf720301cdcabf5eb51.tar.xz ding-libs-c4d2383282b898f4c5914bf720301cdcabf5eb51.zip |
[INI] Avoid double free
I might squash this patch into one of the previous ones.
-rw-r--r-- | ini/ini_fileobj.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ini/ini_fileobj.c b/ini/ini_fileobj.c index 93a9372..2d47c8f 100644 --- a/ini/ini_fileobj.c +++ b/ini/ini_fileobj.c @@ -82,7 +82,10 @@ void ini_config_file_close(struct ini_cfgfile *file_ctx) TRACE_FLOW_ENTRY(); if(file_ctx) { - if(file_ctx->file) fclose(file_ctx->file); + if(file_ctx->file) { + fclose(file_ctx->file); + file_ctx->file = NULL; + } } TRACE_FLOW_EXIT(); |