]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
9457 libzfs_import.c:add_config() has a memory leak
authorAlexander Motin <mav@FreeBSD.org>
Thu, 2 Aug 2018 21:24:04 +0000 (21:24 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Thu, 2 Aug 2018 21:24:04 +0000 (21:24 +0000)
commit732d23f312ac102fb9b1e6a5564a11d2e1bdbf25
treed7136572a1a4ff878e898f0abd0c07844da63be3
parentcb97edbcd01e21cb237997ffade4cdcae29f34da
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>
lib/libzfs/common/libzfs_import.c