Staging: sxg: Fix memory leak in case of allocation failure
authorMithlesh Thukral <mithlesh@linsyssoft.com>
Wed, 18 Feb 2009 13:22:18 +0000 (18:52 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Apr 2009 21:53:12 +0000 (14:53 -0700)
commitb9d1081a833806e2f8ee7d8b827202e1bd5949b2
tree39830ec9ca92e03b721442d196cfdd450e3f3127
parent9914f0536f0e87c13ad51971f0ddcda007436f34
Staging: sxg: Fix memory leak in case of allocation failure

* Fix a memory leak if allocation of skb fails in sxg_fill_descriptor_block.
  In sxg_fill_descriptor_block(), if allocation of skb failed in loop,
  we just came out shouting. This rollbacks all the successful operation
  before skb allocation fails and then returns.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/sxg/sxg.c