From ae7ff7d6ac239648a2579a0de5a0a1be3d4e10e6 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Mon, 21 Jan 2019 20:02:01 +0200 Subject: 11118 libhotplug: NULL pointer errors Reviewed by: Peter Tribble Approved by: Dan McDonald --- usr/src/lib/libhotplug/common/libhotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/src/lib/libhotplug/common') diff --git a/usr/src/lib/libhotplug/common/libhotplug.c b/usr/src/lib/libhotplug/common/libhotplug.c index 91609f457a..d343bebb2c 100644 --- a/usr/src/lib/libhotplug/common/libhotplug.c +++ b/usr/src/lib/libhotplug/common/libhotplug.c @@ -345,14 +345,14 @@ hp_last_change(hp_node_t node) if (node == NULL) { i_hp_dprintf("hp_last_change: invalid arguments.\n"); errno = EINVAL; - return (NULL); + return (0); } if ((node->hp_type != HP_NODE_CONNECTOR) && (node->hp_type != HP_NODE_PORT)) { i_hp_dprintf("hp_last_change: operation not supported.\n"); errno = ENOTSUP; - return (NULL); + return (0); } return (node->hp_last_change); @@ -794,7 +794,7 @@ hp_unpack(char *packed_buf, size_t packed_len, hp_node_t *retp) if (nvlist_next_nvpair(nvl, NULL) == NULL) { nvlist_free(nvl); errno = EINVAL; - return (NULL); + return (0); } for (nvp = NULL; nvp = nvlist_next_nvpair(nvl, nvp); ) { -- cgit v1.2.3