mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-02 18:58:07 +02:00
Merge branch 'desktop-file-leak' into 'master'
bus: Fix memory leaks when parsing .service files See merge request dbus/dbus!42 Reviewed-by: pwithnall
This commit is contained in:
commit
269e0548e2
2 changed files with 3 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
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ test_content (const Test *test,
|
|||
g_assert_nonnull (error.message);
|
||||
g_assert_false (ok);
|
||||
g_assert_null (val);
|
||||
dbus_error_free (&error);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -263,6 +264,7 @@ test_invalid (Fixture *f,
|
|||
g_assert_nonnull (error.name);
|
||||
g_assert_nonnull (error.message);
|
||||
g_assert_null (bdf);
|
||||
dbus_error_free (&error);
|
||||
|
||||
/* Check that it's OK to ignore the error */
|
||||
bdf = bus_desktop_file_load (&str, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue