From patchwork Thu Jul 15 13:20:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Trebels X-Patchwork-Id: 112236 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6FDZN0Y013990 for ; Thu, 15 Jul 2010 13:35:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758591Ab0GONfW (ORCPT ); Thu, 15 Jul 2010 09:35:22 -0400 Received: from server.trebels.com ([217.20.117.122]:48884 "EHLO server.trebels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755115Ab0GONfV (ORCPT ); Thu, 15 Jul 2010 09:35:21 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 15 Jul 2010 13:35:23 +0000 (UTC) X-Greylist: delayed 894 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Jul 2010 09:35:20 EDT Received: from [10.1.100.200] (stephan-home [213.23.218.90]) (authenticated bits=0) by server.trebels.com (8.14.2/8.14.2/Debian-2build1) with ESMTP id o6FDDKUg025111; Thu, 15 Jul 2010 15:13:20 +0200 Subject: [libdvben50221] stack leaks resources on non-MMI session reconnect From: Stephan Trebels To: linux-media@vger.kernel.org Cc: stephan@trebels.com Organization: Familie Trebels Date: Thu, 15 Jul 2010 15:20:14 +0200 Message-ID: <1279200014.14890.33.camel@stephan-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -r 4ba933ff13fb -r 12928658e57e lib/libdvben50221/en50221_stdcam_llci.c --- a/lib/libdvben50221/en50221_stdcam_llci.c Sat Jul 03 15:25:16 2010 +0200 +++ b/lib/libdvben50221/en50221_stdcam_llci.c Thu Jul 15 12:18:17 2010 +0100 @@ -374,14 +374,21 @@ } else if (resource_id == EN50221_APP_MMI_RESOURCEID) { llci->stdcam.mmi_session_number = session_number; } + break; + case S_SCALLBACK_REASON_CLOSE: + if (resource_id == EN50221_APP_MMI_RESOURCEID) { + llci->stdcam.mmi_session_number = -1; + } else if (resource_id == EN50221_APP_DATETIME_RESOURCEID) { + llci->datetime_session_number = -1; + } else if (resource_id == EN50221_APP_AI_RESOURCEID) { + llci->stdcam.ai_session_number = -1; + } else if (resource_id == EN50221_APP_CA_RESOURCEID) { + llci->stdcam.ca_session_number = -1; + } else if (resource_id == EN50221_APP_MMI_RESOURCEID) { + llci->stdcam.mmi_session_number = -1; + } break; - case S_SCALLBACK_REASON_CLOSE: - if (resource_id == EN50221_APP_MMI_RESOURCEID) { - llci->stdcam.mmi_session_number = -1; - } - - break; } return 0; }