[systemd-devel] [PATCH] trivial memory leak in sysv_translate_facility()
Andrey Borzenkov
arvidjaar at gmail.com
Fri Mar 4 05:54:15 PST 2011
If we ever expect caller to not be interested in allocated
string, this string should be freed in this case.
Signed-off-by: Andrey Borzenkov <arvidjaar at gmail.com>
---
src/service.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/service.c b/src/service.c
index 8517579..1ffda05 100644
--- a/src/service.c
+++ b/src/service.c
@@ -348,6 +348,8 @@ finish:
if (_r)
*_r = r;
+ else
+ free(r);
return 1;
}
--
tg: (f1779fd..) upstream/trivial-mem-leak (depends on: master)
More information about the systemd-devel
mailing list