From patchwork Fri Jun 3 18:06:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Bartke X-Patchwork-Id: 847972 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p53I7wAl021126 for ; Fri, 3 Jun 2011 18:07:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753929Ab1FCSH3 (ORCPT ); Fri, 3 Jun 2011 14:07:29 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:64843 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753809Ab1FCSH1 (ORCPT ); Fri, 3 Jun 2011 14:07:27 -0400 Received: by bwz15 with SMTP id 15so1952108bwz.19 for ; Fri, 03 Jun 2011 11:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=nCd7XuwXm4+e6ty4zsdVeJkWTwmXTaffNc5Di0iyhdw=; b=o8NCTORkw8nRgxwZo7CgJS5yUeKtCdG2Yis70UaMUna2+fuz+HUY2pj9uTE+etPw0u +hA0j9CsZ5jjvxELLKy+J9I3L4WsDMeLMbMs9GyM5cQtxpCOYvRVVgA8ho56mo/R/d5s cmSjm0BlfOuUHxHPpfHnepUzC2urkRrVUXj9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=GtLmWqXDcDGhTjo0hlEgNxVkKV43PcVjqNQp5n9pRYKmPkzVqeiw2KIoUYjRERfOmk pd3qFc5iY7wwmHmz+uxn8BFcbEw9TNxIWObcfeoBO4kVPQs5iEhsLMuYOrzs4BgxOoiL +9hXyXrl1OFbGRUrAPIq0xZvAueATdXLL/rD4= Received: by 10.204.73.206 with SMTP id r14mr2126299bkj.181.1307124445499; Fri, 03 Jun 2011 11:07:25 -0700 (PDT) Received: from localhost.localdomain (dslb-188-098-000-112.pools.arcor-ip.net [188.98.0.112]) by mx.google.com with ESMTPS id l24sm1432999bkw.3.2011.06.03.11.07.23 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 03 Jun 2011 11:07:24 -0700 (PDT) From: Andre Bartke To: awalls@md.metrocast.net Cc: mchehab@infradead.org, ivtv-devel@ivtvdriver.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Andre Bartke Subject: [PATCH] drivers/media/video: fix memory leak of snd_cx18_init() Date: Fri, 3 Jun 2011 20:06:58 +0200 Message-Id: <1307124418-12073-1-git-send-email-andre.bartke@gmail.com> X-Mailer: git-send-email 1.7.5.2 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.6 (demeter2.kernel.org [140.211.167.43]); Fri, 03 Jun 2011 18:07:58 +0000 (UTC) cxsc is not freed in the error case. Signed-off-by: Andre Bartke --- drivers/media/video/cx18/cx18-alsa-main.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/cx18/cx18-alsa-main.c b/drivers/media/video/cx18/cx18-alsa-main.c index d50d69d..a1e6c2a 100644 --- a/drivers/media/video/cx18/cx18-alsa-main.c +++ b/drivers/media/video/cx18/cx18-alsa-main.c @@ -192,6 +192,7 @@ static int snd_cx18_init(struct v4l2_device *v4l2_dev) err_exit_free: if (sc != NULL) snd_card_free(sc); + kfree(cxsc); err_exit: return ret; }