* Fixed: SEGV in clixon_netconf_lib functions from internal errors including validation.

* Check xerr argument both before and after call on netconf lib functions
This commit is contained in:
Olof hagsand 2021-07-27 09:39:44 +02:00
parent 600f29a117
commit dee081646c
9 changed files with 103 additions and 39 deletions

View file

@ -557,7 +557,7 @@ xmldb_readfile(clicon_handle h,
}
cprintf(cberr, "Internal error: %s", clicon_err_reason);
clicon_err_reset();
if (netconf_operation_failed_xml(xerr, "application", cbuf_get(cberr))< 0)
if (xerr && netconf_operation_failed_xml(xerr, "application", cbuf_get(cberr))< 0)
goto done;
cbuf_free(cberr);
goto fail;