mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 12:50:09 +01:00
libnm/keyfile: fix double free in keyfile's get_bytes()
Fixes:5e7b14af03(cherry picked from commitfcf254c03a) (cherry picked from commit1c56be4090) (cherry picked from commit71e2a25a0d)
This commit is contained in:
parent
ca231f6c8e
commit
fd6acf6183
1 changed files with 1 additions and 1 deletions
|
|
@ -821,7 +821,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