unlzo: fix input buffer free
authorSascha Hauer <s.hauer@pengutronix.de>
Mon, 23 Jan 2012 13:51:02 +0000 (14:51 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Mon, 23 Jan 2012 13:51:02 +0000 (14:51 +0100)
unlzo modifies the pointer to in_buf, so we have to free the original
buffer, not the modified pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/common/unlzo.c

index 57b88242097f38663723f4021c7a0e454c210c4c..57d16f3ccae340818012c1dd67208a0f566bc0ca 100644 (file)
@@ -254,7 +254,7 @@ STATIC int INIT unlzo(u8 *input, unsigned int in_len,
        ret = 0;
 exit_2:
        if (!input)
-               free(in_buf);
+               free(in_buf_save);
 exit_1:
        if (!output)
                free(out_buf);