aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ini.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-07-20 15:42:11 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2009-07-20 15:42:11 +0200
commit01827732cb3d5289e8071d8317b95d5c4043857c (patch)
tree538cfeb718af95570b7e94f70e8b8a897c1c5f65 /lib/ini.c
parent2ea8736c7f59db6c183752f1f2e47cd988c08b66 (diff)
Fixed fd leak in ini.c. How could I miss this one.. :-(
Diffstat (limited to 'lib/ini.c')
-rw-r--r--lib/ini.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ini.c b/lib/ini.c
index d9900aeb..aa291bb2 100644
--- a/lib/ini.c
+++ b/lib/ini.c
@@ -42,12 +42,16 @@ ini_t *ini_open( char *file )
ini->file[ini->size] = 0;
ini->cur = ini->file;
ini->c_section = "";
+
+ close( fd );
+
return ini;
}
-
- g_free( ini );
+
if( fd >= 0 )
close( fd );
+
+ ini_close( ini );
return NULL;
}