Memory leak in cli load_config_file
This commit is contained in:
parent
bed6d3c739
commit
b0d38a513c
1 changed files with 3 additions and 2 deletions
|
|
@ -828,7 +828,7 @@ load_config_file(clicon_handle h,
|
|||
FILE *fp = NULL;
|
||||
cxobj *xt = NULL;
|
||||
cxobj *x;
|
||||
cbuf *cbxml;
|
||||
cbuf *cbxml = NULL;
|
||||
char *formatstr = NULL;
|
||||
enum format_enum format = FORMAT_XML;
|
||||
yang_stmt *yspec;
|
||||
|
|
@ -952,10 +952,11 @@ load_config_file(clicon_handle h,
|
|||
replace?OP_REPLACE:OP_MERGE,
|
||||
cbuf_get(cbxml)) < 0)
|
||||
goto done;
|
||||
cbuf_free(cbxml);
|
||||
ok:
|
||||
ret = 0;
|
||||
done:
|
||||
if (cbxml)
|
||||
cbuf_free(cbxml);
|
||||
if (lineptr)
|
||||
free(lineptr);
|
||||
if (xerr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue