mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 08:42:46 +00:00
trivial: Fix tiny memory leak when getting GUIDs from an invalid archive
This commit is contained in:
parent
e5711c762b
commit
9939f1c85c
@ -1090,8 +1090,10 @@ fu_engine_get_guids_from_store (AsStore *store)
|
||||
g_string_append_printf (str, "%s,", as_provide_get_value (prov));
|
||||
}
|
||||
}
|
||||
if (str->len == 0)
|
||||
if (str->len == 0) {
|
||||
g_string_free (str, TRUE);
|
||||
return NULL;
|
||||
}
|
||||
g_string_truncate (str, str->len - 1);
|
||||
return g_string_free (str, FALSE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user