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/fm/libfmevent/common/fmev_publish.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr/src/lib/fm/libfmevent/common/fmev_publish.c') diff --git a/usr/src/lib/fm/libfmevent/common/fmev_publish.c b/usr/src/lib/fm/libfmevent/common/fmev_publish.c index f3dc01ed11..6b9f464550 100644 --- a/usr/src/lib/fm/libfmevent/common/fmev_publish.c +++ b/usr/src/lib/fm/libfmevent/common/fmev_publish.c @@ -434,11 +434,10 @@ do_publish(const char *file, const char *func, int64_t line, done: /* Free a passed in nvlist iff success */ - if (nvl && rc == FMEV_SUCCESS) + if (rc == FMEV_SUCCESS) nvlist_free(nvl); - if (tmpnvl) - nvlist_free(tmpnvl); + nvlist_free(tmpnvl); return (rc); } -- cgit v1.2.3