Fixed Segv in nacm write when MERGE and creating object

This commit is contained in:
Olof hagsand 2019-08-09 14:20:38 +02:00
parent 35808c8352
commit a57dbfc6f0
3 changed files with 4 additions and 2 deletions

View file

@ -342,7 +342,7 @@ nacm_rule_datanode(cxobj *xt,
if ((module_rule = xml_find_body(xrule, "module-name")) == NULL)
goto nomatch;
if (strcmp(module_rule,"*")!=0){
if ((ys = xml_spec(xr)) == NULL)
if (xr==NULL || (ys = xml_spec(xr)) == NULL)
goto nomatch;
ymod = ys_module(ys);
module = yang_argument_get(ymod);