Eliminate free'ing already freed chunks.
MFC after: 1 week
This commit is contained in:
parent
b9f6304141
commit
6950a26a50
@ -297,11 +297,12 @@ storecreate(struct store *store)
|
|||||||
}
|
}
|
||||||
store->currlen = 0;
|
store->currlen = 0;
|
||||||
store->store = NULL;
|
store->store = NULL;
|
||||||
} else
|
} else if (store->store != NULL) {
|
||||||
if (store->store != NULL)
|
|
||||||
/* Free previously allocated memory */
|
/* Free previously allocated memory */
|
||||||
for (i = 0; store->store[i] != NULL; i++)
|
for (i = 0; store->store[i] != NULL; i++)
|
||||||
free(store->store[i]);
|
free(store->store[i]);
|
||||||
|
store->store[0] = NULL;
|
||||||
|
}
|
||||||
store->used = 0;
|
store->used = 0;
|
||||||
|
|
||||||
return store;
|
return store;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user