From 425cbc7d6e161cf3640a6ebaf8496762b9198d21 Mon Sep 17 00:00:00 2001 From: Konrad Kuchciak Date: Wed, 18 Nov 2020 13:42:05 +0100 Subject: [PATCH] Fix leaking memory Change-Id: I9549919e11dcc51f8c79f25fd3b527c8128e5130 --- src/aul.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/aul.c b/src/aul.c index 0ca773c..353e261 100644 --- a/src/aul.c +++ b/src/aul.c @@ -54,7 +54,7 @@ static void app_status_change_handler(GDBusConnection *connection, ret = process_update_info(process, &aul_app_status); if (ret) - return; + goto cleanup; if (process->class != old_class) _I_PROC(process, "Class changed"); @@ -62,6 +62,12 @@ static void app_status_change_handler(GDBusConnection *connection, } else { _W("Received AUL status update for PID %d, but it wasn't found in internal state - ignoring.", pid); } + +cleanup: + free(appid); + free(pkgid); + free(status); + free(type); } int aul_listener_init(void) -- 2.34.1