aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammad Abdul Awal <mohammad.abdul.awal@intel.com>2016-06-21 10:56:55 +0100
committerMohammad Abdul Awal <mohammad.abdul.awal@intel.com>2016-06-21 10:08:52 +0000
commitd09ce4f4bd49f35573851e6ba907889216195f2d (patch)
tree92a408038bae103e39b876c8854b722c5fff0aab
parentd22d494ececba21bd08d85ee17ae245ed1f64b78 (diff)
Fixed reallocated memory initialisation bug
Change-Id: I8db6fe42303022c5ee3326892a4670f8445c27ed Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
-rw-r--r--examples/udpfwd/parse.c2
1 files changed, 2 insertions, 0 deletions
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;