- Fixed memory leak in dataset_list_callb

This commit is contained in:
Asmir Selimovic 2020-01-30 11:25:23 +01:00
parent e317057e63
commit 5b0203da39
1 changed files with 1 additions and 1 deletions

2
zfs.c
View File

@ -40,11 +40,11 @@ void dataset_list_free(dataset_list_t *list) {
int dataset_list_callb(zfs_handle_t *dataset, void *data) {
dataset_list_t **lroot = (dataset_list_t**)data;
dataset_list_t *nroot = create_dataset_list_item();
if ( !((*lroot)->zh) ) {
(*lroot)->zh = dataset;
} else {
dataset_list_t *nroot = create_dataset_list_item();
nroot->zh = dataset;
nroot->pnext = (void*)*lroot;
*lroot = nroot;