mirror of
https://github.com/sigmasternchen/CFloor
synced 2025-03-15 04:18:55 +00:00
set header mem to NULL on free; otherwise realloc of same space doesn't work
This commit is contained in:
parent
1cdf3474f1
commit
aceb054f38
1 changed files with 3 additions and 1 deletions
|
@ -165,8 +165,10 @@ void headers_free(struct headers* headers) {
|
|||
free(headers->headers[i].value);
|
||||
}
|
||||
|
||||
if (headers->headers != NULL)
|
||||
if (headers->headers != NULL) {
|
||||
free(headers->headers);
|
||||
headers->headers = NULL;
|
||||
}
|
||||
|
||||
headers->number = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue