Patch attached. (git send-email currently brokken)
declarations with _cleanup_free_ attribute needs to be NULL initialized.
From e242049410bb8373f8724ac24328e0f024b9929b Mon Sep 17 00:00:00 2001
From: Daniel Buch <[email protected]>
Date: Wed, 6 May 2015 10:28:08 +0200
Subject: [PATCH] systemctl: null-initialize pointer with cleanup attribute
---
src/systemctl/systemctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 4f36ba8..4c45bfc 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -7289,7 +7289,7 @@ static int halt_main(sd_bus *bus) {
if (arg_when > 0) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_close_unref_ sd_bus *b = NULL;
- _cleanup_free_ char *m;
+ _cleanup_free_ char *m = NULL;
if (avoid_bus()) {
log_error("Unable to perform operation without bus connection.");
--
2.4.0
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel