mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 06:50:10 +01:00
libnm: fix leak in nm_utils_is_json_object()
Fixes:32f78ae6c3('libnm: expose nm_utils_is_json_object() utility function') (cherry picked from commit1cf11ccbca)
This commit is contained in:
parent
12e4a4a5df
commit
49ec86092b
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue