[systemd-devel] [PATCH 2/2] sysv-generator: remove NULL pointer dereference

Shawn Landden shawn at churchofgit.com
Sun Apr 26 10:58:49 PDT 2015


(coverity)
---
 src/sysv-generator/sysv-generator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index 5ecd750..714ce8f 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -922,7 +922,7 @@ finish:
 int main(int argc, char *argv[]) {
         int r, q;
         _cleanup_lookup_paths_free_ LookupPaths lp = {};
-        _cleanup_(free_sysvstub_hashmapp) Hashmap *all_services;
+        _cleanup_(free_sysvstub_hashmapp) Hashmap *all_services = NULL;
         SysvStub *service;
         Iterator j;
 
-- 
2.2.1.209.g41e5f3a



More information about the systemd-devel mailing list