teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0661-pid1-fix-free-of-uninitialized-pointer-in-unit_fail_.patch

be0c12
From 30afbfdc82eb61f3bf47d6b1fa67a61d0ffcc4f2 Mon Sep 17 00:00:00 2001
be0c12
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
be0c12
Date: Fri, 14 Dec 2018 08:16:31 +0100
be0c12
Subject: [PATCH] pid1: fix free of uninitialized pointer in
be0c12
 unit_fail_if_noncanonical()
be0c12
be0c12
https://bugzilla.redhat.com/show_bug.cgi?id=1653068
be0c12
(cherry picked from commit 58d9d89b4b41189bdcea86c2ad5cf708b7d54aca)
be0c12
be0c12
Related: #1970945
be0c12
---
be0c12
 src/core/unit.c | 2 +-
be0c12
 1 file changed, 1 insertion(+), 1 deletion(-)
be0c12
be0c12
diff --git a/src/core/unit.c b/src/core/unit.c
be0c12
index 93c13e58d9..152a860d08 100644
be0c12
--- a/src/core/unit.c
be0c12
+++ b/src/core/unit.c
be0c12
@@ -4785,7 +4785,7 @@ void unit_warn_if_dir_nonempty(Unit *u, const char* where) {
be0c12
 }
be0c12
 
be0c12
 int unit_fail_if_noncanonical(Unit *u, const char* where) {
be0c12
-        _cleanup_free_ char *canonical_where;
be0c12
+        _cleanup_free_ char *canonical_where = NULL;
be0c12
         int r;
be0c12
 
be0c12
         assert(u);