unlzo: fix input buffer free
authorSascha Hauer <[email protected]>
Fri, 13 Jan 2012 01:21:01 +0000 (17:21 -0800)
committerLinus Torvalds <[email protected]>
Fri, 13 Jan 2012 04:13:13 +0000 (20:13 -0800)
unlzo modifies the pointer to in_buf, so we have to free the original
buffer, not the modified pointer.

Signed-off-by: Sascha Hauer <[email protected]>
Cc: Lasse Collin <[email protected]>
Cc: Namhyung Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/decompress_unlzo.c

index 5a7a2adf4c4c2aa8d64d881e0ff1739acbe8782c..4531294fa62f2cb5de592178ddca2c0afc223558 100644 (file)
@@ -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);