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/libcmdutils/common/process_xattrs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'usr/src/lib/libcmdutils/common') diff --git a/usr/src/lib/libcmdutils/common/process_xattrs.c b/usr/src/lib/libcmdutils/common/process_xattrs.c index 1264d467bd..50b1de58d6 100644 --- a/usr/src/lib/libcmdutils/common/process_xattrs.c +++ b/usr/src/lib/libcmdutils/common/process_xattrs.c @@ -218,8 +218,7 @@ mv_xattrs(char *cmd, char *infile, char *outfile, int sattr, int silent) "failed to move system attribute"); } error: - if (res != NULL) - nvlist_free(res); + nvlist_free(res); if (silent == 0 && etext != NULL) { if (!sattr) (void) fprintf(stderr, dgettext(TEXT_DOMAIN, @@ -246,8 +245,7 @@ done: (void) close(indfd); if (outdfd != -1) (void) close(outdfd); - if (response != NULL) - nvlist_free(response); + nvlist_free(response); if (etext != NULL) return (1); else @@ -319,7 +317,6 @@ sysattr_list(char *cmd, int fd, char *fname) return (response); } } - if (response != NULL) - nvlist_free(response); + nvlist_free(response); return (NULL); } -- cgit v1.2.3