From 0a689b19f8d3bd6c90e1a04a62302bae672e5e12 Mon Sep 17 00:00:00 2001 From: Arnaud Cornet Date: Sat, 20 Oct 2007 22:57:09 +0200 Subject: [PATCH] Don't forget to free the buffer... --- src/irc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/irc.c b/src/irc.c index c1edb23..9930e11 100644 --- a/src/irc.c +++ b/src/irc.c @@ -2116,10 +2116,7 @@ void oidentd_dump(list_t *connl) content = (char *)malloc(stats.st_size + 1); if (content == NULL){ - mylog(LOG_WARN, "oidentd_dump : malloc failed, " - "returning"); - fclose(f); - free(filename); + fatal("out of memory"); return; } @@ -2165,6 +2162,7 @@ void oidentd_dump(list_t *connl) content[stats.st_size - 1] != '\n') fprintf(f, "\n"); } + free(content); } for (list_it_init(connl, &it); list_it_item(&it); list_it_next(&it)) {