[PATCH 02/10] lib: fwts_button: free data after successful fwts_get()

Colin King colin.king at canonical.com
Thu May 1 14:01:13 UTC 2014


From: Colin Ian King <colin.king at canonical.com>

Coverity scan found a memory leak on data returned from
fwts_get().  This needs to be free'd.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/lib/src/fwts_button.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/src/fwts_button.c b/src/lib/src/fwts_button.c
index 2202c03..6a34eb7 100644
--- a/src/lib/src/fwts_button.c
+++ b/src/lib/src/fwts_button.c
@@ -86,6 +86,7 @@ static int fwts_button_match_state_proc(
 					(*matched)++;
 				else
 					(*not_matched)++;
+				free(data);
 			}
 		}
 	} while (entry);
-- 
2.0.0.rc0




More information about the fwts-devel mailing list