From 504027020a1967aaa92e71326dbe3d111929a088 Mon Sep 17 00:00:00 2001
From: J Freyensee <james_p_freyensee@linux.intel.com>
Date: Thu, 11 Nov 2010 14:01:42 -0800
Subject: [PATCH 2/3] kfree memory leak error.

This patch fixes a bug in which one of the getID() corner
cases does not deallocate memory.

Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
---
 drivers/misc/pti.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c
index 691fa2f..c8df8e9 100644
--- a/drivers/misc/pti.c
+++ b/drivers/misc/pti.c
@@ -234,7 +234,10 @@ static struct masterchannel *getID(u8 *IDarray, int max_IDS, int baseID)
 		if (IDarray[i] != 0xff)
 			break;
 	if (i == max_IDS)
+	{
+		kfree(mc);
 		return 0;
+	}
 	/* find the bit */
 	mask = 0x80;
 	for (j = 0; j < 8; j++) {
-- 
1.6.6.1

