[CRIU] [PATCH] lib: don't use uninitialized value "m"

Andrey Vagin avagin at openvz.org
Tue Sep 22 04:07:49 PDT 2015


From: Andrew Vagin <avagin at openvz.org>

*** CID 150397:  Memory - illegal accesses  (UNINIT)
/lib/criu.c: 696 in criu_local_add_irmap_path()
690
691             return 0;
692
693     err:
694             if (my_path)
695                     free(my_path);
>>>     CID 150397:  Memory - illegal accesses  (UNINIT)
>>>     Using uninitialized value "m".
696             if (m)
697                     free(m);
698
699             return -ENOMEM;
700     }
701

Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 lib/criu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/criu.c b/lib/criu.c
index 1adb257..346ffad 100644
--- a/lib/criu.c
+++ b/lib/criu.c
@@ -693,8 +693,6 @@ int criu_local_add_irmap_path(criu_opts *opts, char *path)
 err:
 	if (my_path)
 		free(my_path);
-	if (m)
-		free(m);
 
 	return -ENOMEM;
 }
-- 
2.4.3



More information about the CRIU mailing list