MFC r316904: 7729 libzfs_core`lzc_rollback() leaks result nvl

illumos/illumos-gate@ac428481f9
ac428481f9

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>

MFC after:	2 weeks
This commit is contained in:
Andriy Gapon 2017-05-24 20:53:01 +00:00
commit 5644318970
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318814

View File

@ -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);
}