mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Backing store: clean up resources properly.
Patch from Felix S. Fixes #2579.
This commit is contained in:
parent
328a29d22f
commit
17ae38771d
@ -1565,6 +1565,7 @@ initialise(const struct llcache_store_parameters *parameters)
|
||||
ret = build_entrymap(newstate);
|
||||
if (ret != NSERROR_OK) {
|
||||
/* that obviously went well */
|
||||
free(newstate->entries);
|
||||
free(newstate->path);
|
||||
free(newstate);
|
||||
return ret;
|
||||
@ -1573,6 +1574,8 @@ initialise(const struct llcache_store_parameters *parameters)
|
||||
ret = read_blocks(newstate);
|
||||
if (ret != NSERROR_OK) {
|
||||
/* oh dear */
|
||||
free(newstate->addrmap);
|
||||
free(newstate->entries);
|
||||
free(newstate->path);
|
||||
free(newstate);
|
||||
return ret;
|
||||
@ -1640,6 +1643,8 @@ finalise(void)
|
||||
0);
|
||||
}
|
||||
|
||||
free(storestate->addrmap);
|
||||
free(storestate->entries);
|
||||
free(storestate->path);
|
||||
free(storestate);
|
||||
storestate = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user