aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-11-24 07:50:00 +0200
committerLasse Collin <lasse.collin@tukaani.org>2010-11-24 07:50:00 +0200
commitade582babfccb4fde7560ed148ded45badc94d2a (patch)
treebfe966a0727954d146231a8827032b9a1bbd52ea
parent7c0f612420074db79f21ad84764d9cd08232c717 (diff)
downloadxz-embedded-ade582babfccb4fde7560ed148ded45badc94d2a.tar.gz
Use malloc() and free() in decompress_unxz.c.
Using these instead of kmalloc() and kfree() makes things more consistent with the existing decompressor wrappers in Linux.
-rw-r--r--linux/lib/decompress_unxz.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/linux/lib/decompress_unxz.c b/linux/lib/decompress_unxz.c
index a6568d5..53d2941 100644
--- a/linux/lib/decompress_unxz.c
+++ b/linux/lib/decompress_unxz.c
@@ -283,12 +283,12 @@ STATIC int INIT unxz(/*const*/ unsigned char *in, int in_size,
ret = xz_dec_run(s, &b);
} else {
b.out_size = XZ_IOBUF_SIZE;
- b.out = kmalloc(XZ_IOBUF_SIZE, GFP_KERNEL);
+ b.out = malloc(XZ_IOBUF_SIZE);
if (b.out == NULL)
goto error_alloc_out;
if (fill != NULL) {
- in = kmalloc(XZ_IOBUF_SIZE, GFP_KERNEL);
+ in = malloc(XZ_IOBUF_SIZE);
if (in == NULL)
goto error_alloc_in;
@@ -332,9 +332,9 @@ STATIC int INIT unxz(/*const*/ unsigned char *in, int in_size,
} while (ret == XZ_OK);
if (fill != NULL)
- kfree(in);
+ free(in);
- kfree(b.out);
+ free(b.out);
}
if (in_used != NULL)
@@ -377,7 +377,7 @@ STATIC int INIT unxz(/*const*/ unsigned char *in, int in_size,
return -1;
error_alloc_in:
- kfree(b.out);
+ free(b.out);
error_alloc_out:
xz_dec_end(s);