[PATCHv2,2/2] config: Fix memory initialization

Submitted by Radostin Stoyanov on Jan. 20, 2019, 2:42 p.m.

Details

Message ID 20190120144224.2612-2-rstoyanov1@gmail.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Radostin Stoyanov Jan. 20, 2019, 2:42 p.m.
Initialize allocated memory when parsing configuration file.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
---
 criu/config.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/criu/config.c b/criu/config.c
index 89afdd748..9195badd3 100644
--- a/criu/config.c
+++ b/criu/config.c
@@ -59,6 +59,7 @@  static char ** parse_config(char *filepath)
 		fclose(configfile);
 		exit(1);
 	}
+	memzero(configuration, config_size * sizeof(char *));
 	/*
 	 * Initialize first element, getopt ignores it.
 	 */