Verified Commit 49ec8609 authored by Thomas Haller's avatar Thomas Haller

libnm: fix leak in nm_utils_is_json_object()

Fixes: 32f78ae6 ('libnm: expose nm_utils_is_json_object() utility function')
(cherry picked from commit 1cf11ccb)
parent 12e4a4a5
Pipeline #170014 passed with stage
in 41 minutes and 24 seconds
......@@ -5428,7 +5428,7 @@ gboolean
nm_utils_is_json_object (const char *str, GError **error)
{
#if WITH_JSON_VALIDATION
json_t *json;
nm_auto_decref_json json_t *json = NULL;
json_error_t jerror;
g_return_val_if_fail (!error || !*error, FALSE);
......@@ -5465,7 +5465,6 @@ nm_utils_is_json_object (const char *str, GError **error)
return FALSE;
}
json_decref (json);
return TRUE;
#else /* !WITH_JSON_VALIDATION */
g_return_val_if_fail (!error || !*error, FALSE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment