From ded1fc978e437cb05a9e48f79e470fe904fe93d2 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 5 Jan 2025 10:43:38 +0100 Subject: [PATCH] not json parse config by error --- src/kds_s2000w_handler_opts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index a5be246..b1a53f4 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -40,17 +40,16 @@ void _load_options(handler* h) response* resp = kds_s2000w_client_response_init(); int result = kds_s2000w_client_get_option(h->sessionid, resp); - h->current_scanner_config = json_tokener_parse(resp->data); if (result != 0 || resp->code != 200) { debug_printf_int(ERROR, "load options response code", resp->code); kds_s2000w_client_response_free(resp); resp = NULL; - json_object_put(h->current_scanner_config); - h->current_scanner_config = NULL; return; } + h->current_scanner_config = json_tokener_parse(resp->data); + kds_s2000w_client_response_free(resp); resp = NULL; } -- 2.39.5