From bb7ffdaf5ad1c7e65af598830957b6b19835f93f Mon Sep 17 00:00:00 2001 From: George Melikov Date: Sat, 21 Jan 2017 22:33:11 +0300 Subject: [PATCH] OpenZFS 7729 - libzfs_core`lzc_rollback() leaks result nvl Authored by: Yuri Pankov Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed-by: Brian Behlendorf Ported-by: George Melikov mail@gmelikov.ru OpenZFS-issue: https://www.illumos.org/issues/7729 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/882877e Closes #5620 --- lib/libzfs_core/libzfs_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libzfs_core/libzfs_core.c b/lib/libzfs_core/libzfs_core.c index 9be34d34b334..3110d89030e1 100644 --- a/lib/libzfs_core/libzfs_core.c +++ b/lib/libzfs_core/libzfs_core.c @@ -830,6 +830,8 @@ lzc_rollback(const char *fsname, char *snapnamebuf, int snapnamelen) const char *snapname = fnvlist_lookup_string(result, "target"); (void) strlcpy(snapnamebuf, snapname, snapnamelen); } + nvlist_free(result); + return (err); }