chiark / gitweb /
json: avoid cleanup of unitialized variable
[elogind.git] / 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);