diff mbox

[libdvben50221] stack leaks resources on non-MMI session reconnect

Message ID 1279200014.14890.33.camel@stephan-laptop (mailing list archive)
State Not Applicable
Headers show

Commit Message

Stephan Trebels July 15, 2010, 1:20 p.m. UTC
None
diff mbox

Patch

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;
 }