miniupnpc: mem leaks fixes.
This commit is contained in:
parent
02a4050ae8
commit
b55ecd70ef
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue