summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imudp/imudp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index f5a8a08d..7068af0b 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -233,11 +233,11 @@ static rsRetVal addListner(void __attribute__((unused)) *pVal, uchar *pNewVal)
newnLstn = nLstn + newSocks[0];
CHKmalloc(newlcnfinfo = (struct cnfinfo_s*) MALLOC(sizeof(struct cnfinfo_s) * newnLstn));
/* ready to copy */
- iDst = 0;
+ iDst = nLstn;
memcpy(newlcnfinfo, lcnfinfo, nLstn * sizeof(struct cnfinfo_s));
for(iSrc = 1 ; iSrc <= newSocks[0] ; ++iSrc, ++iDst) {
- lcnfinfo[iDst].udpLstnSocks = newSocks[iSrc];
- lcnfinfo[iDst].udpRulesets = pBindRuleset;
+ newlcnfinfo[iDst].udpLstnSocks = newSocks[iSrc];
+ newlcnfinfo[iDst].udpRulesets = pBindRuleset;
}
free(lcnfinfo);
lcnfinfo = newlcnfinfo;