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> MFC after: 3 days Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12646
This commit is contained in:
parent
93ca7f45e7
commit
a6aeb2b6e4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user