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/uts/common/io/devfm.c | |
parent | d643a855cbd8c4fb4fe966406fa05dff70673597 (diff) | |
download | illumos-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/uts/common/io/devfm.c')
-rw-r--r-- | usr/src/uts/common/io/devfm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr/src/uts/common/io/devfm.c b/usr/src/uts/common/io/devfm.c index 221338de7e..eb5e24079e 100644 --- a/usr/src/uts/common/io/devfm.c +++ b/usr/src/uts/common/io/devfm.c @@ -298,12 +298,10 @@ fm_ioctl(dev_t dev, int cmd, intptr_t data, int flag, cred_t *cred, int *rvalp) err = subr->func(cmd, invl, &onvl); - if (invl != NULL) - nvlist_free(invl); + nvlist_free(invl); if (err != 0) { - if (onvl != NULL) - nvlist_free(onvl); + nvlist_free(onvl); return (err); } @@ -425,8 +423,7 @@ _fini(void) int ret; if ((ret = mod_remove(&modlinkage)) == 0) { - if (fm_vers_nvl != NULL) - nvlist_free(fm_vers_nvl); + nvlist_free(fm_vers_nvl); } return (ret); |