]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix memory leak in function add_config()
authorliaoyuxiangqin <guo.yong33@zte.com.cn>
Sat, 30 Jul 2016 03:03:01 +0000 (11:03 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 1 Aug 2016 19:49:03 +0000 (12:49 -0700)
commite24e62a948e1519fb4c1bfc40d9d51e36fbbe63e
treea29f9fe24fdbe2c727b8212f0940ae3f5cd9f924
parentdf053d67a9c07a9763a4c04468083644eb9aa234
Fix memory leak in function add_config()

Config of a hot spare or l2cache device will leak memory in function
add_config().  At the start of this function, when dealing with a
config which belongs to a hot spare not currently in use or a l2cache
device the config should be freed.

Signed-off-by: liaoyuxiangqin <guo.yong33@zte.com.cn>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4910
lib/libzfs/libzfs_import.c