Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932495AbZJIN6s (ORCPT ); Fri, 9 Oct 2009 09:58:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760871AbZJIN6q (ORCPT ); Fri, 9 Oct 2009 09:58:46 -0400 Received: from server1.wserver.cz ([82.113.45.157]:37644 "EHLO server1.wserver.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760695AbZJIN6p (ORCPT ); Fri, 9 Oct 2009 09:58:45 -0400 From: Jiri Slaby To: James.Bottomley@suse.de Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH -repost 1/4] SCSI: aacraid, fix memory leak Date: Fri, 9 Oct 2009 15:58:05 +0200 Message-Id: <1255096688-23399-1-git-send-email-jirislaby@gmail.com> X-Mailer: git-send-email 1.6.4.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 981 Lines: 29 Stanse found a memory leak on one fail path in aac_send_raw_srb. Add kfree there. Signed-off-by: Jiri Slaby Cc: James E.J. Bottomley --- drivers/scsi/aacraid/commctrl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 0391d75..5c9a8be 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -649,6 +649,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) AAC_OPT_NEW_COMM) ? (dev->scsi_host_ptr->max_sectors << 9) : 65536) { + kfree (usg); rcode = -EINVAL; goto cleanup; } -- 1.6.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/