mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 22:20:27 +01:00
libnm/keyfile: fix double free in keyfile's get_bytes()
Fixes: 5e7b14af03
This commit is contained in:
parent
98ca7022e3
commit
fcf254c03a
1 changed files with 1 additions and 1 deletions
|
|
@ -969,7 +969,7 @@ get_bytes (KeyfileReaderInfo *info,
|
|||
* byte-array. The reason is that zero_terminate is there to terminate
|
||||
* *valid* strings. It's not there to terminated invalid (empty) strings.
|
||||
*/
|
||||
return g_bytes_new_take (tmp_string, 0);
|
||||
return g_bytes_new_static ("", 0);
|
||||
}
|
||||
|
||||
for (length = 0; tmp_string[length]; length++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue