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/libipp/libipp.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'usr/src/lib/libipp/libipp.c') diff --git a/usr/src/lib/libipp/libipp.c b/usr/src/lib/libipp/libipp.c index 94a5dc3a45..0b931a10e8 100644 --- a/usr/src/lib/libipp/libipp.c +++ b/usr/src/lib/libipp/libipp.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -225,8 +223,7 @@ ipp_action_destroy( return (dispatch(&nvlp, NULL, NULL)); failed: - if (nvlp != NULL) - nvlist_free(nvlp); + nvlist_free(nvlp); errno = rc; return (-1); } @@ -336,8 +333,7 @@ ipp_action_info( return (dispatch(&nvlp, fn, arg)); failed: - if (nvlp != NULL) - nvlist_free(nvlp); + nvlist_free(nvlp); errno = rc; return (-1); } @@ -389,8 +385,7 @@ ipp_action_mod( return (dispatch(&nvlp, string_callback, (void *)modnamep)); failed: - if (nvlp != NULL) - nvlist_free(nvlp); + nvlist_free(nvlp); errno = rc; return (-1); } @@ -446,8 +441,7 @@ ipp_list_mods( return (rc); failed: - if (nvlp != NULL) - nvlist_free(nvlp); + nvlist_free(nvlp); errno = rc; return (-1); } @@ -510,8 +504,7 @@ ipp_mod_list_actions( return (rc); failed: - if (nvlp != NULL) - nvlist_free(nvlp); + nvlist_free(nvlp); errno = rc; return (-1); } -- cgit v1.2.3