From a0e1f0c1649431d0e79918850af2f88645676409 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 15 Nov 2018 22:28:58 +0100 Subject: [PATCH 1/3] debug-generator: fix minor memory leak --- src/debug-generator/debug-generator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/debug-generator/debug-generator.c b/src/debug-generator/debug-generator.c index 800d31cebe1..a9497fe5872 100644 --- a/src/debug-generator/debug-generator.c +++ b/src/debug-generator/debug-generator.c @@ -174,6 +174,8 @@ int main(int argc, char *argv[]) { finish: arg_default_unit = mfree(arg_default_unit); + strv_free(arg_wants); + strv_free(arg_mask); return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } From 7dcb6ef06f77d2174e80a4c7db17cf652680bb4f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 15 Nov 2018 22:29:23 +0100 Subject: [PATCH 2/3] hibernate-resume-generator: fix minor memory leak on error path --- src/hibernate-resume/hibernate-resume-generator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hibernate-resume/hibernate-resume-generator.c b/src/hibernate-resume/hibernate-resume-generator.c index 036493a3898..bfee2fde313 100644 --- a/src/hibernate-resume/hibernate-resume-generator.c +++ b/src/hibernate-resume/hibernate-resume-generator.c @@ -95,10 +95,13 @@ int main(int argc, char *argv[]) { if (arg_noresume) { log_notice("Found \"noresume\" on the kernel command line, quitting."); - return EXIT_SUCCESS; + r = 0; + goto finish; } r = process_resume(); + +finish: free(arg_resume_device); return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; From b39cfe21b43332165749f793043e81db8af7b5f8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 16 Nov 2018 11:43:49 +0100 Subject: [PATCH 3/3] core: show error code even when debug logging --- src/core/manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/manager.c b/src/core/manager.c index d7dbf6c8a97..3150740e05a 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -4453,7 +4453,7 @@ static void manager_deserialize_uid_refs_one_internal( r = hashmap_replace(*uid_refs, UID_TO_PTR(uid), UINT32_TO_PTR(c)); if (r < 0) { - log_debug("Failed to add UID reference entry"); + log_debug_errno(r, "Failed to add UID reference entry: %m"); return; } }