summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-10-15 08:03:14 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-10-15 08:03:14 +0000
commita6aeb2b6e4b01717238fc2ea05053a3c5a99f620 (patch)
tree209466c27f87cd1094f55d3fe2d24f462e836a79
parent93ca7f45e7b9a63f9621cb78084f0baebe2cc0bd (diff)
downloadsrc-test2-a6aeb2b6e4b01717238fc2ea05053a3c5a99f620.tar.gz
src-test2-a6aeb2b6e4b01717238fc2ea05053a3c5a99f620.zip
Notes
-rw-r--r--usr.sbin/ctld/uclparse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c
index 21872420b62d..73d5c0a93197 100644
--- a/usr.sbin/ctld/uclparse.c
+++ b/usr.sbin/ctld/uclparse.c
@@ -619,6 +619,8 @@ uclparse_target(const char *name, const ucl_object_t *top)
const char *key;
target = target_new(conf, name);
+ if (target == NULL)
+ return (1);
while ((obj = ucl_iterate_object(top, &it, true))) {
key = ucl_object_key(obj);
@@ -807,6 +809,8 @@ uclparse_lun(const char *name, const ucl_object_t *top)
const char *key;
lun = lun_new(conf, name);
+ if (lun == NULL)
+ return (1);
while ((obj = ucl_iterate_object(top, &it, true))) {
key = ucl_object_key(obj);