mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 14:00:18 +01:00
libnm: fix leak in nm_utils_is_json_object()
Fixes: 32f78ae6c3 ('libnm: expose nm_utils_is_json_object() utility function')
This commit is contained in:
parent
03dc759026
commit
1cf11ccbca
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue