diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-01-09 09:36:15 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-01-09 09:36:15 +0100 |
commit | c1ac395b0b6010938827225739d1861c2b1fa63a (patch) | |
tree | c931204fd92f00edfb5b675a422c404367f0dd6d /plugins | |
parent | 5438784b3ff566dc9efd863151ff782e2b9f4e45 (diff) | |
download | rsyslog-c1ac395b0b6010938827225739d1861c2b1fa63a.tar.gz rsyslog-c1ac395b0b6010938827225739d1861c2b1fa63a.tar.xz rsyslog-c1ac395b0b6010938827225739d1861c2b1fa63a.zip |
imudp refactor: regression fix
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imudp/imudp.c | 6 |
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; |