mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-02 15:27:59 +02:00
BusDesktopFile: Don't leak content if key=value appears before [Section]
BusDesktopFile has a strange convention in which the various parser helper functions (parse_section_start(), etc.) free the parser on error. However, this particular error case happens outside the helper functions and so will leak. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
24d0be54cc
commit
2df063be18
1 changed files with 1 additions and 0 deletions
|
|
@ -689,6 +689,7 @@ bus_desktop_file_load (DBusString *filename,
|
|||
{
|
||||
dbus_set_error(error, DBUS_ERROR_FAILED,
|
||||
"invalid service file: key=value before [Section]");
|
||||
parser_free (&parser);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue