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 5d7d0db..6951416 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);