From patchwork Fri Nov 19 18:41:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasiliy Kulikov X-Patchwork-Id: 340681 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 oAJIhWO0020611 for ; Fri, 19 Nov 2010 18:43:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756385Ab0KSSl6 (ORCPT ); Fri, 19 Nov 2010 13:41:58 -0500 Received: from mail-ew0-f46.google.com ([209.85.215.46]:32907 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756367Ab0KSSl4 (ORCPT ); Fri, 19 Nov 2010 13:41:56 -0500 Received: by mail-ew0-f46.google.com with SMTP id 5so695116ewy.19 for ; Fri, 19 Nov 2010 10:41:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=g1YRlMP+bmZJWhfu5zhfKdyTswM8xxx8AAJO4IY5ieo=; b=NEhgBdch+7EeXFGPm2p/NLD2QB+563/KNBbXI5l3c7ZeiegYJHwQBeEFmAoYpBLcpn vKK177/veYDd6l4cFy4kEwdQj6E4FuMs6BKn4VLpodc5defk/aJ7JjTjDKOnHEzgI0li aGCbui9k595+gppR+lxzIcbXgBkr1dgOvqHgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=OuJmeZWyTITBHm4GhLkRqrHsX2/bClQ2DIjLTg2KqeEAH0HU9pXRNIFf1qUHFqPDvy Oeb8Vd7I1cyXhf9EKGuhz+SlSUDmV2xDKLC3dh+0bIFBfPGM3K48P5vNGUXOtrf88j+f juz+WZ5SEzujdV5Trr0sXMemJvHqRYqEIEm8k= Received: by 10.213.9.137 with SMTP id l9mr1981357ebl.84.1290192114535; Fri, 19 Nov 2010 10:41:54 -0800 (PST) Received: from localhost (ppp91-77-42-153.pppoe.mtu-net.ru [91.77.42.153]) by mx.google.com with ESMTPS id q58sm1719915eeh.15.2010.11.19.10.41.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Nov 2010 10:41:53 -0800 (PST) From: Vasiliy Kulikov To: kernel-janitors@vger.kernel.org Cc: Mike Isely , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: video: pvrusb2: fix memory leak Date: Fri, 19 Nov 2010 21:41:49 +0300 Message-Id: <1290192109-11611-1-git-send-email-segoon@openwall.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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]); Fri, 19 Nov 2010 18:43:32 +0000 (UTC) diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index 3d7e5aa..281806b 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c @@ -647,7 +647,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp, if (ret) { pvr2_trace(PVR2_TRACE_ERROR_LEGS, "device_register failed"); - kfree(class_dev); + put_device(class_dev); return; }