[CRIU] [PATCH] restore: initialize uninitialized pointer

Tycho Andersen tycho.andersen at canonical.com
Fri Feb 19 07:49:01 PST 2016


Closes #115
Reported-by: Coverity
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 criu/cr-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 67032a3..8c752d1 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -2822,7 +2822,7 @@ rst_prep_creds_args(CredsEntry *ce, unsigned long *prev_pos)
 	memcpy(&args->creds, ce, sizeof(args->creds));
 
 	if (ce->lsm_profile || opts.lsm_supplied) {
-		char *rendered, *profile;
+		char *rendered = NULL, *profile;
 
 		profile = ce->lsm_profile;
 		if (opts.lsm_supplied)
-- 
2.5.0



More information about the CRIU mailing list