]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFV r337184: 9457 libzfs_import.c:add_config() has a memory leak
authorAlexander Motin <mav@FreeBSD.org>
Thu, 2 Aug 2018 21:25:32 +0000 (21:25 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Thu, 2 Aug 2018 21:25:32 +0000 (21:25 +0000)
commitd49e9be14fc1958074a79602939ece119002bf58
treeadb6af506fdb2fe4cb22aaa18adb154bf9c910a4
parent2bce9a531601e917fa9426af29395adfdb1ba68d
parent732d23f312ac102fb9b1e6a5564a11d2e1bdbf25
MFV r337184: 9457 libzfs_import.c:add_config() has a memory leak

A memory leak occurs on lines 209 and 213 because the config is not freed
in the error case.  The interface to add_config() seems less than ideal -
it would be better if it copied any data necessary from the config and the
caller freed it.

illumos/illumos-gate@ddfe901b12348d31c500fb57f9174e88860a4061

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:     sara hartse <sara.hartse@delphix.com>
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c