dryang / rpms / systemd

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