Don't forget to free the buffer...

This commit is contained in:
Arnaud Cornet 2007-10-20 22:57:09 +02:00
parent b026214142
commit 0a689b19f8
1 changed files with 2 additions and 4 deletions

View File

@ -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)) {