diff options
author | mav <mav@FreeBSD.org> | 2017-07-26 16:30:57 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2017-07-26 16:30:57 +0000 |
commit | 330ae0aac5d0b13b7a9c5448f401a69a823d4902 (patch) | |
tree | f7fefe8f22abbc094ca529d1d2f14361a437b43b | |
parent | f355265c9e8017052ab4fd2347b9d2f5af8febbf (diff) | |
download | FreeBSD-src-330ae0aac5d0b13b7a9c5448f401a69a823d4902.zip FreeBSD-src-330ae0aac5d0b13b7a9c5448f401a69a823d4902.tar.gz |
MFC r318814: MFC r316904: 7729 libzfs_core`lzc_rollback() leaks result nvl
illumos/illumos-gate@ac428481f96be89add7a1edf43ae47dd71038553
https://github.com/illumos/illumos-gate/commit/ac428481f96be89add7a1edf43ae47dd71038553
https://www.illumos.org/issues/7729
libzfs_core`lzc_rollback() doesn't free the result nvl after lzc_ioctl() call.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c index 6693d78..9e4e882 100644 --- a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c +++ b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c @@ -759,6 +759,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); } |