mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
fix libzfs diff mem leak in an error path
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Alek Pinchuk <[email protected]> Closes #18301
This commit is contained in:
1 parent
5b93d1a218
commit
ae7fcd5f92
1 file changed
+1
-1
@@ -821,10 +821,10 @@ zfs_show_diffs(zfs_handle_t *zhp, int outfd, const char *fromsnap,
|
||||
(void) close(pipefd[1]);
|
||||
(void) pthread_join(tid, NULL);
|
||||
|
||||
teardown_differ_info(&di);
|
||||
if (di.zerr != 0) {
|
||||
zfs_error_aux(zhp->zfs_hdl, "%s", zfs_strerror(di.zerr));
|
||||
return (zfs_error(zhp->zfs_hdl, EZFS_DIFF, di.errbuf));
|
||||
}
|
||||
teardown_differ_info(&di);
|
||||
return (0);
|
||||
}
|
||||
Reference in new issue
Block a user