commit dc35d7521677c48e09bf0cbe4ace8f3e3e93d4ca
Author: Kevin McKinney <kmckinney@MegaMachine.(none)>
Date: Tue Aug 9 20:36:11 2011 -0400
Staging: bcm: Fix memory leak reported during compile.
This patch is to fix a potential memory leak were temp_buff buffer
is not being freed when a certain condition is true.
Signed-off-by: Kevin McKinney <[email protected]>
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index 1986094..d304755 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -1058,6 +1058,7 @@ cntrlEnd:
if (copy_to_user(IoBuffer.OutputBuffer, temp_buff,
sizeof(S_MIBS_HOST_STATS_MIBS)))
Status = -EFAULT;
+ kfree(temp_buff);
break;
}
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel