Verified Commit 1cf11ccb 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')
parent 03dc7590
Pipeline #170011 passed with stages
in 37 minutes and 48 seconds
......@@ -5484,7 +5484,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);
......@@ -5521,7 +5521,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