diff options
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> | 2016-02-24 11:58:55 -0500 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2016-02-27 08:52:10 -0800 |
commit | aab83bb83be7342f6cfccaed8d5fe0b2f404855d (patch) | |
tree | 548e8760643ee94860fb29486fbf965675c52a59 /usr/src/lib/libipp/libipp.c | |
parent | d643a855cbd8c4fb4fe966406fa05dff70673597 (diff) | |
download | illumos-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/libipp/libipp.c')
-rw-r--r-- | usr/src/lib/libipp/libipp.c | 17 |
1 files changed, 5 insertions, 12 deletions
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 <stdio.h> #include <stdlib.h> #include <sys/types.h> @@ -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); } |