svn commit: r324720 - stable/11/usr.sbin/ctld
Baptiste Daroussin
bapt at FreeBSD.org
Wed Oct 18 08:18:02 UTC 2017
Author: bapt
Date: Wed Oct 18 08:18:01 2017
New Revision: 324720
URL: https://svnweb.freebsd.org/changeset/base/324720
Log:
MFC r324623:
Fix ctld segfaulting when using ucl conf file format and having duplicated
lun or target
Submitted by: Nikita Kozlov <nikita.kozlov at blade-group.com>
Sponsored by: blade
Differential Revision: https://reviews.freebsd.org/D12646
Modified:
stable/11/usr.sbin/ctld/uclparse.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/usr.sbin/ctld/uclparse.c
==============================================================================
--- stable/11/usr.sbin/ctld/uclparse.c Wed Oct 18 08:06:05 2017 (r324719)
+++ stable/11/usr.sbin/ctld/uclparse.c Wed Oct 18 08:18:01 2017 (r324720)
@@ -619,6 +619,8 @@ uclparse_target(const char *name, const ucl_object_t *
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);
More information about the svn-src-stable-11
mailing list