From 1f03d0bae1fa7bd3482e6909d335e229264e5472 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 21 Dec 2018 17:22:15 +0000 Subject: [PATCH] Fix passing wrong variables to nvlist_destroy() after r333446. Reported by: Alexander Fedorov (IT-Grad.ru) MFC after: 5 days --- usr.sbin/ctladm/ctladm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 2761b2c763b0..b7920f8ef171 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -667,7 +667,7 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) } bailout: - nvlist_destroy(req.args_nvl); + nvlist_destroy(option_list); free(driver); return (retval); @@ -2542,7 +2542,7 @@ cctl_create_lun(int fd, int argc, char **argv, char *combinedopt) fprintf(stdout, "Device ID: %s\n", req.reqdata.create.device_id); bailout: - nvlist_destroy(req.args_nvl); + nvlist_destroy(option_list); return (retval); } @@ -2644,7 +2644,7 @@ cctl_rm_lun(int fd, int argc, char **argv, char *combinedopt) printf("LUN %d removed successfully\n", lun_id); bailout: - nvlist_destroy(req.args_nvl); + nvlist_destroy(option_list); return (retval); } @@ -2764,7 +2764,7 @@ cctl_modify_lun(int fd, int argc, char **argv, char *combinedopt) printf("LUN %d modified successfully\n", lun_id); bailout: - nvlist_destroy(req.args_nvl); + nvlist_destroy(option_list); return (retval); }