From: Mohammad Abdul Awal Date: Tue, 21 Jun 2016 09:56:55 +0000 (+0100) Subject: Fixed reallocated memory initialisation bug X-Git-Tag: v18.02~56 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=d09ce4f4bd49f35573851e6ba907889216195f2d;p=tldk.git Fixed reallocated memory initialisation bug Change-Id: I8db6fe42303022c5ee3326892a4670f8445c27ed Signed-off-by: Mohammad Abdul Awal --- diff --git a/examples/udpfwd/parse.c b/examples/udpfwd/parse.c index 979145c..78df01b 100644 --- a/examples/udpfwd/parse.c +++ b/examples/udpfwd/parse.c @@ -328,6 +328,7 @@ netbe_parse_dest(const char *fname, struct netbe_dest_prm *prm) rc = -ENOMEM; break; } + memset(&dp[n], 0, sizeof(dp[0]) * (num - n)); } dp[n].line = ln + 1; @@ -560,6 +561,7 @@ netfe_parse_cfg(const char *fname, struct netfe_lcore_prm *lp) rc = -ENOMEM; break; } + memset(&sp[n], 0, sizeof(sp[0]) * (num - n)); } sp[n].line = ln + 1;