From patchwork Mon Nov 22 05:13:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 346851 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 oAM58kr8004902 for ; Mon, 22 Nov 2010 05:08:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750790Ab0KVFIo (ORCPT ); Mon, 22 Nov 2010 00:08:44 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:45528 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772Ab0KVFIn (ORCPT ); Mon, 22 Nov 2010 00:08:43 -0500 Received: by gyb11 with SMTP id 11so1052771gyb.19 for ; Sun, 21 Nov 2010 21:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=HVH8K4CS6a8BiL1d5Lo7tBrBPzTXdqWSZ6XzmrqdcM0=; b=emUCIHLhMytCcJyi/5KoRlpDc3RqXNukgp9BZtTimuCbQ3b2lvKw8322XlEXkACc7Q k4AayApHIY3tRFi6vNZTvrhmRw3NzxvCYOAEBWbfqu2lMXIUfHlTn1r4JBhE48BdItM8 0mp7Gqwg1MP5xnStYLOPuXyeHEf3sHErGUYps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=hpOKP4kAEApkFu+Tt6tiJ2pX+PovG03CIKbHNe9fz8Dj4QKafXgdZSxFB3ICtnD8Tu zvUrYXnLkkyStdFnhJrZgFV5jU1oLdW6s4X6cjwl+hrmQ2JorgU5LbXCcO2yaaSz3RVF XEODq2K9Z9doae42oGIP9NP0XXYGroft0j/Ow= Received: by 10.100.17.4 with SMTP id 4mr3690031anq.119.1290402522723; Sun, 21 Nov 2010 21:08:42 -0800 (PST) Received: from [192.168.100.50] (60-251-136-127.HINET-IP.hinet.net [60.251.136.127]) by mx.google.com with ESMTPS id d15sm5324760ana.0.2010.11.21.21.08.40 (version=SSLv3 cipher=RC4-MD5); Sun, 21 Nov 2010 21:08:42 -0800 (PST) Subject: [PATCH] Input: ps2mult - fix wrong kfree in ps2mult_connect error path From: Axel Lin To: linux-kernel Cc: Dmitry Eremin-Solenikov , Dmitry Torokhov , linux-input@vger.kernel.org Date: Mon, 22 Nov 2010 13:13:39 +0800 Message-Id: <1290402820.6941.8.camel@mola> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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]); Mon, 22 Nov 2010 05:08:46 +0000 (UTC) diff --git a/drivers/input/serio/ps2mult.c b/drivers/input/serio/ps2mult.c index 6bce22e..15aa81c 100644 --- a/drivers/input/serio/ps2mult.c +++ b/drivers/input/serio/ps2mult.c @@ -207,7 +207,7 @@ static int ps2mult_connect(struct serio *serio, struct serio_driver *drv) err_out: while (--i >= 0) kfree(psm->ports[i].serio); - kfree(serio); + kfree(psm); return error; }