systemd/0169-path-util-plug-leak.patch

25 lines
688 B
Diff

From 68d0fa134101ce58202a1cf013d034c6fa4e6d38 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Tue, 6 Jan 2015 19:12:38 +0100
Subject: [PATCH] path-util: plug leak
(cherry picked from commit a0539d7753d6a3ede87bf5e57d7c40d5bc1dc230)
---
src/shared/path-util.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index 0ca2d332eb..b368eeb74c 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -515,6 +515,9 @@ fallback:
return -errno;
}
+ free(parent);
+ parent = NULL;
+
r = path_get_parent(t, &parent);
if (r < 0)
return r;