miniupnpc: mem leaks fixes.

This commit is contained in:
Thomas Bernard 2015-07-30 01:10:03 +02:00
parent 02a4050ae8
commit b55ecd70ef
2 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,7 @@ getHTTPResponse(int s, int * size)
return NULL; return NULL;
} }
content_buf = malloc(content_buf_len); content_buf = malloc(content_buf_len);
if(header_buf == NULL) if(content_buf == NULL)
{ {
free(header_buf); free(header_buf);
#ifdef DEBUG #ifdef DEBUG

View File

@ -165,6 +165,7 @@ int main(int argc, char * * argv)
fprintf(stderr, "Failed to read file %s. %d out of %d bytes.\n", fprintf(stderr, "Failed to read file %s. %d out of %d bytes.\n",
argv[1], r, len); argv[1], r, len);
fclose(f); fclose(f);
free(buffer);
return 1; return 1;
} }
fclose(f); fclose(f);