summaryrefslogtreecommitdiff
path: root/usr/src/lib/libcmdutils/common
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/libcmdutils/common
parentd643a855cbd8c4fb4fe966406fa05dff70673597 (diff)
downloadillumos-joyent-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/libcmdutils/common')
-rw-r--r--usr/src/lib/libcmdutils/common/process_xattrs.c9
1 files changed, 3 insertions, 6 deletions
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);
}