Skip to content

Commit

Permalink
Fix closing resources if http binding fails #20
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdickmeiss committed Nov 29, 2017
1 parent 4aff737 commit ee274b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,9 @@ int http_init(struct conf_server *server, const char *record_fname)
if (iochan_add(server->iochan_man, c, 0))
{
yaz_log(YLOG_WARN, "Can not create HTTP binding socket");
CLOSESOCKET(s);
if (record_file)
fclose(record_file);
iochan_destroy(c);
return -1;
}
Expand Down

0 comments on commit ee274b6

Please sign in to comment.