]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
irda: Correctly clean up self->ias_obj on irda_bind() failure.
authorDavid S. Miller <davem@davemloft.net>
Tue, 31 Aug 2010 01:35:24 +0000 (18:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Sep 2010 00:18:12 +0000 (17:18 -0700)
commit2f2c0c6440110d7436f202ecf918734243e7b870
tree792de2a1607ba246f933e614d79657a7e0744e74
parent88c2651de40107913811814405591d9077d71b02
irda: Correctly clean up self->ias_obj on irda_bind() failure.

[ Upstream commit 628e300cccaa628d8fb92aa28cb7530a3d5f2257 ]

If irda_open_tsap() fails, the irda_bind() code tries to destroy
the ->ias_obj object by hand, but does so wrongly.

In particular, it fails to a) release the hashbin attached to the
object and b) reset the self->ias_obj pointer to NULL.

Fix both problems by using irias_delete_object() and explicitly
setting self->ias_obj to NULL, just as irda_release() does.

Reported-by: Tavis Ormandy <taviso@cmpxchg8b.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/irda/af_irda.c