This fixes a coverity-spotted problem:
>From 0587faf5c82c7b6696d9b27e4047cfb3f2749ae0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Wed, 15 Jun 2011 16:47:39 +0200
Subject: [PATCH] systemctl: plug a leak upon create_symlink mismatch
---
src/systemctl.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/systemctl.c b/src/systemctl.c
index 2bd173c..e6817ee 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -3957,18 +3957,19 @@ static int create_symlink(const char *verb, const char
*old_path, const char *ne
log_error("readlink() failed: %s", strerror(-r));
return r;
}
if (streq(dest, old_path)) {
free(dest);
return 1;
}
+ free(dest);
return 0;
}
assert_not_reached("Unknown action.");
}
static int install_info_symlink_alias(const char *verb, InstallInfo *i, const
char *config_path) {
char **s;
char *alias_path = NULL;
--
1.7.6.rc0.293.g40857
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel