chiark / gitweb /
networkd: Initialize variable to NULL
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 27 Nov 2013 15:28:54 +0000 (17:28 +0200)
committerTom Gundersen <teg@jklm.no>
Wed, 27 Nov 2013 15:44:54 +0000 (16:44 +0100)
If any number of arguments are given, _cleanup_manager_free_ is used
with unitialized memory causing a crash.

src/network/networkd.c

index 1d43361..360afba 100644 (file)
@@ -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);