@@ -827,10 +827,12 @@ /* Open socket as ANSI I/O for ease of use */ fp = fdopen(fd, "w+b"); if (fp == NULL) { close(fd); + free(log); + return; } request = filed_get_http_request(fp, request, options); @@ -1048,10 +1050,12 @@ if (fd < 0) { /* Log the new connection */ filed_log_msg("ACCEPT_FAILED"); failure_count++; + + free(log); continue; } /* Fill in log structure */