mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 11:00:09 +01:00
Ensure that zero-length array translates to NULL
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3498 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
4901747c77
commit
a95ec1b046
1 changed files with 4 additions and 0 deletions
|
|
@ -241,6 +241,10 @@ nm_object_array_demarshal (GValue *value,
|
|||
g_warning ("%s: couldn't create object for %s", __func__, path);
|
||||
}
|
||||
}
|
||||
if (temp->len == 0) {
|
||||
g_ptr_array_free (temp, TRUE);
|
||||
temp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Deallocate after to ensure that an object that might already
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue