mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Fix more leaks detected by ASAN
This commit fixes a bunch of missing free() calls in a10d50f99
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: João Carlos Mendes Luís <jonny@jonny.eng.br>
Closes #10219
This commit is contained in:
parent
32d805c3e2
commit
70e5ad31f6
@ -931,10 +931,15 @@ libzfs_mnttab_add(libzfs_handle_t *hdl, const char *special,
|
||||
* Another thread may have already added this entry
|
||||
* via libzfs_mnttab_update. If so we should skip it.
|
||||
*/
|
||||
if (avl_find(&hdl->libzfs_mnttab_cache, mtn, NULL) != NULL)
|
||||
if (avl_find(&hdl->libzfs_mnttab_cache, mtn, NULL) != NULL) {
|
||||
free(mtn->mtn_mt.mnt_special);
|
||||
free(mtn->mtn_mt.mnt_mountp);
|
||||
free(mtn->mtn_mt.mnt_fstype);
|
||||
free(mtn->mtn_mt.mnt_mntopts);
|
||||
free(mtn);
|
||||
else
|
||||
} else {
|
||||
avl_add(&hdl->libzfs_mnttab_cache, mtn);
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user