mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-09 20:42:02 +03:00
treeview: Correct mis-freeing in treeview_create error path
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
4b6967fee4
commit
22ee6621fe
@ -1965,7 +1965,7 @@ treeview_create(treeview **tree,
|
||||
|
||||
(*tree)->fields = malloc(sizeof(struct treeview_field) * n_fields);
|
||||
if ((*tree)->fields == NULL) {
|
||||
free(tree);
|
||||
free(*tree);
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user