... | ... |
@@ -100,6 +100,7 @@ static void msxml_error_handler(void* arg, const char* msg, xmlParserSeverities |
100 | 100 |
cli_dbgmsg("%s:%d: unknown severity : %s", (char*)URI, line, msg); |
101 | 101 |
break; |
102 | 102 |
} |
103 |
+ free(URI); |
|
103 | 104 |
} |
104 | 105 |
|
105 | 106 |
#if HAVE_JSON |
... | ... |
@@ -453,6 +454,9 @@ int cli_msxml_parse_document(cli_ctx *ctx, xmlTextReaderPtr reader, const struct |
453 | 453 |
mxctx.mode = mode; |
454 | 454 |
if (mode) { |
455 | 455 |
mxctx.root = ctx->wrkproperty; |
456 |
+ /* JSON Sanity Check */ |
|
457 |
+ if (!mxctx.root) |
|
458 |
+ mxctx.mode = 0; |
|
456 | 459 |
mxctx.toval = 0; |
457 | 460 |
} |
458 | 461 |
#endif |