From patchwork Wed Oct 27 21:19:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 286672 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9RLJk3V020440 for ; Wed, 27 Oct 2010 21:19:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932332Ab0J0VTp (ORCPT ); Wed, 27 Oct 2010 17:19:45 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:64461 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932306Ab0J0VTn (ORCPT ); Wed, 27 Oct 2010 17:19:43 -0400 Received: by wyf28 with SMTP id 28so1171319wyf.19 for ; Wed, 27 Oct 2010 14:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=OL+SFKbnErJPkUHqnFShoztceZSZfqR4HV26z2UbM6k=; b=fBsOibUHGtAbUYCPOg8MlXLWX11vVmNWUnhcuWLhOg7LWeOWM+2dY5d7HXB2l8Ugsh qc8Hz5uz3fzdn4K+7cxiYdQMywRvEq995g3p7R3ibACACDDK6GtplA5c694/u1j2R88k YwQzCCM0hUx4a1QHE1/M5FZcsWWckl/5wN9us= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=FrdhUKtpaIO8ngwdZhGh0cIYODxJuaBQacm2+Gu85lCtPeSb3J2/VT+z4PnOtDygvA /e9J+yi1518GMJlm8ZphbIzk/R4HdQp4PIc+y5FReDe8mHOW2fHKnPjLGcMXfGVI1u85 G5OF10D0uSvKsIbkE+OcmtJVrUqvBMKPO/pz8= Received: by 10.216.242.78 with SMTP id h56mr3728693wer.47.1288214382136; Wed, 27 Oct 2010 14:19:42 -0700 (PDT) Received: from bicker (h2db5.n1.ips.mtn.co.ug [41.210.173.181]) by mx.google.com with ESMTPS id 7sm183904wet.0.2010.10.27.14.19.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Oct 2010 14:19:40 -0700 (PDT) Date: Wed, 27 Oct 2010 23:19:32 +0200 From: Dan Carpenter To: Steve French Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, kernel-janitors@vger.kernel.org Subject: [patch 1/2] cifs: add kfree() on error path Message-ID: <20101027211932.GK6062@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 27 Oct 2010 21:19:46 +0000 (UTC) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 45af003..06a006b 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1353,6 +1353,7 @@ static int cifs_writepages(struct address_space *mapping, if (!experimEnabled && tcon->ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { cifsFileInfo_put(open_file); + kfree(iov); return generic_writepages(mapping, wbc); } cifsFileInfo_put(open_file);