From 2df063be18f08111255d5089e1a91e09b8cc83f5 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 16 Nov 2018 17:25:18 +0000 Subject: [PATCH] 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 --- bus/desktop-file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bus/desktop-file.c b/bus/desktop-file.c index 64e9b143f..bf1e09cf5 100644 --- a/bus/desktop-file.c +++ b/bus/desktop-file.c @@ -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 -- 2.47.3