batman-adv: release vlan object after checking the CRC
authorAntonio Quartulli <[email protected]>
Tue, 28 Jan 2014 01:06:47 +0000 (02:06 +0100)
committerAntonio Quartulli <[email protected]>
Mon, 17 Feb 2014 16:17:00 +0000 (17:17 +0100)
commit91c2b1a9f680ff105369d49abc7e19ca7efb33e1
treed5449f16cab7d66c710acbfe16d036282d41adfc
parente889241f45f9cecbc84a6ffed577083ab52e62ee
batman-adv: release vlan object after checking the CRC

There is a refcounter unbalance in the CRC checking routine
invoked on OGM reception. A vlan object is retrieved (thus
its refcounter is increased by one) but it is never properly
released. This leads to a memleak because the vlan object
will never be free'd.

Fix this by releasing the vlan object after having read the
CRC.

Reported-by: Russell Senior <[email protected]>
Reported-by: Daniel <[email protected]>
Reported-by: cmsv <[email protected]>
Signed-off-by: Antonio Quartulli <[email protected]>
Signed-off-by: Marek Lindner <[email protected]>
net/batman-adv/translation-table.c