summaryrefslogtreecommitdiff
path: root/usr/src/lib/fm/libfmevent/common/fmev_publish.c
diff options
context:
space:
mode:
authorJosef 'Jeff' Sipek <jeffpc@josefsipek.net>2016-02-24 11:58:55 -0500
committerRobert Mustacchi <rm@joyent.com>2016-02-27 08:52:10 -0800
commitaab83bb83be7342f6cfccaed8d5fe0b2f404855d (patch)
tree548e8760643ee94860fb29486fbf965675c52a59 /usr/src/lib/fm/libfmevent/common/fmev_publish.c
parentd643a855cbd8c4fb4fe966406fa05dff70673597 (diff)
downloadillumos-gate-aab83bb83be7342f6cfccaed8d5fe0b2f404855d.tar.gz
6659 nvlist_free(NULL) is a no-op
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Marcel Telka <marcel@telka.sk> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/lib/fm/libfmevent/common/fmev_publish.c')
-rw-r--r--usr/src/lib/fm/libfmevent/common/fmev_publish.c5
1 files changed, 2 insertions, 3 deletions
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);
}