chiark / gitweb /
json: avoid cleanup of unitialized variable
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 May 2015 03:25:48 +0000 (23:25 -0400)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 08:57:27 +0000 (09:57 +0100)
src/shared/json.c

index 5d7d0dba808610e46a54cbb37f135df3783b804d..69514160c291b8868968edb0c4b1078fb63d84f3 100644 (file)
@@ -723,7 +723,7 @@ static int json_parse_tokens(JsonVariant **tokens, size_t ntokens, JsonVariant *
         size_t it = 0;
         int r;
         JsonVariant *e;
-        _cleanup_jsonunref_ JsonVariant *p;
+        _cleanup_jsonunref_ JsonVariant *p = NULL;
 
         assert(tokens);
         assert(ntokens);