From 8fd3cfd085888dc8f8aeabac1cfde03fd0592f25 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 30 Nov 2011 15:12:10 +1100 Subject: [PATCH] unlzo: Fix input buffer free unlzo modifies the pointer to in_buf, so we have to free the original buffer, not the modified pointer. This only happens when a fill function is passed, a case which is currently unused in the kernel. Signed-off-by: Sascha Hauer Cc: Lasse Collin Signed-off-by: Andrew Morton --- lib/decompress_unlzo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c index 5a7a2adf4c4c..4531294fa62f 100644 --- a/lib/decompress_unlzo.c +++ b/lib/decompress_unlzo.c @@ -279,7 +279,7 @@ STATIC inline int INIT unlzo(u8 *input, int in_len, ret = 0; exit_2: if (!input) - free(in_buf); + free(in_buf_save); exit_1: if (!output) free(out_buf); -- 2.39.5