Fixed reallocated memory initialisation bug 84/1684/2
authorMohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Tue, 21 Jun 2016 09:56:55 +0000 (10:56 +0100)
committerMohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Tue, 21 Jun 2016 10:08:52 +0000 (10:08 +0000)
Change-Id: I8db6fe42303022c5ee3326892a4670f8445c27ed
Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
examples/udpfwd/parse.c

index 979145c..78df01b 100644 (file)
@@ -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;