[systemd-devel] [PATCH] networkd: Initialize variable to NULL
Patrik Flykt
patrik.flykt at linux.intel.com
Wed Nov 27 07:28:54 PST 2013
If any number of arguments are given, _cleanup_manager_free_ is used
with unitialized memory causing a crash.
---
src/network/networkd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/network/networkd.c b/src/network/networkd.c
index 1d43361..360afba 100644
--- a/src/network/networkd.c
+++ b/src/network/networkd.c
@@ -25,7 +25,7 @@
#include "networkd.h"
int main(int argc, char *argv[]) {
- _cleanup_manager_free_ Manager *m;
+ _cleanup_manager_free_ Manager *m = NULL;
int r;
log_set_target(LOG_TARGET_AUTO);
--
1.7.10.4
More information about the systemd-devel
mailing list