teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

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

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