]> wimlib.net Git - wimlib/blobdiff - src/lzms-decompress.c
{lzx,lzms-decompress.c}: Allocate context with DECODE_TABLE_ALIGNMENT
[wimlib] / src / lzms-decompress.c
index 2bc1c754cd69e49b86c17cce9e934ed888392cd4..1ddc3f19dfdce40e9b0bc8e8833505654fd95595 100644 (file)
@@ -1032,7 +1032,7 @@ lzms_free_decompressor(void *_ctx)
 {
        struct lzms_decompressor *ctx = _ctx;
 
-       FREE(ctx);
+       ALIGNED_FREE(ctx);
 }
 
 static int
@@ -1042,7 +1042,8 @@ lzms_create_decompressor(size_t max_block_size,
 {
        struct lzms_decompressor *ctx;
 
-       ctx = MALLOC(sizeof(struct lzms_decompressor));
+       ctx = ALIGNED_MALLOC(sizeof(struct lzms_decompressor),
+                            DECODE_TABLE_ALIGNMENT);
        if (ctx == NULL)
                return WIMLIB_ERR_NOMEM;