From: Pavel Roskin Date: Fri, 2 Sep 2005 00:05:19 +0000 (-0400) Subject: [PATCH] orinoco: Fix memory leak on error in processing hostscan frames. X-Git-Tag: v2.6.14-rc1~748^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=708218b064e3ad3d55ac0f9d19b3c8c0fb7af3a4;p=linux-2.6 [PATCH] orinoco: Fix memory leak on error in processing hostscan frames. Signed-off-by: Pavel Roskin diff-tree ca955293cdfd3139e150d3b4fed3922a7eb651fb (from cb289b9f9b2a0f3ae7070a008f22e383b37526ee) Author: Pavel Roskin Date: Thu Sep 1 19:08:00 2005 -0400 Fix memory leak on error in processing hostscan frames. Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 223d357953..95eb05abc4 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c @@ -1284,8 +1284,10 @@ static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) /* Read scan data */ err = hermes_bap_pread(hw, IRQ_BAP, (void *) buf, len, infofid, sizeof(info)); - if (err) + if (err) { + kfree(buf); break; + } #ifdef ORINOCO_DEBUG {