chiark / gitweb /
json: fix a mem leak
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 19 May 2015 21:19:29 +0000 (23:19 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 08:57:23 +0000 (09:57 +0100)
src/shared/json.c

index f6c44f4..5d7d0db 100644 (file)
@@ -126,7 +126,7 @@ JsonVariant *json_variant_unref(JsonVariant *variant) {
                 return NULL;
 
         if (variant->type == JSON_VARIANT_ARRAY || variant->type == JSON_VARIANT_OBJECT)
-                return json_object_unref(variant);
+                json_object_unref(variant);
 
         else if (variant->type == JSON_VARIANT_STRING)
                 free(variant->string);