From aab83bb83be7342f6cfccaed8d5fe0b2f404855d Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Wed, 24 Feb 2016 11:58:55 -0500 Subject: 6659 nvlist_free(NULL) is a no-op Reviewed by: Toomas Soome Reviewed by: Marcel Telka Approved by: Robert Mustacchi --- usr/src/lib/libcontract/common/libcontract.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'usr/src/lib/libcontract/common/libcontract.c') diff --git a/usr/src/lib/libcontract/common/libcontract.c b/usr/src/lib/libcontract/common/libcontract.c index 2c8afda094..3a3bf4a76a 100644 --- a/usr/src/lib/libcontract/common/libcontract.c +++ b/usr/src/lib/libcontract/common/libcontract.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -467,8 +465,7 @@ errout: if (event_buffer) free(event_buffer); if (info) { - if (info->nvl) - nvlist_free(info->nvl); + nvlist_free(info->nvl); free(info); } return (error); @@ -507,8 +504,7 @@ ct_event_free(ct_evthdl_t evthdl) { struct ctlib_event_info *info = evthdl; - if (info->nvl) - nvlist_free(info->nvl); + nvlist_free(info->nvl); free(info); } -- cgit v1.2.3