]> wimlib.net Git - wimlib/blobdiff - src/lzx-decompress.c
{lzx,lzms-decompress.c}: Allocate context with DECODE_TABLE_ALIGNMENT
[wimlib] / src / lzx-decompress.c
index bbb105144710464068c33a9eeaabdb41ea452c05..d259eeedc38ae31b6c7156fc0b1599f3b2af8d90 100644 (file)
@@ -809,7 +809,7 @@ lzx_free_decompressor(void *_ctx)
 {
        struct lzx_decompressor *ctx = _ctx;
 
-       FREE(ctx);
+       ALIGNED_FREE(ctx);
 }
 
 static int
@@ -822,7 +822,8 @@ lzx_create_decompressor(size_t max_window_size,
        if (!lzx_window_size_valid(max_window_size))
                return WIMLIB_ERR_INVALID_PARAM;
 
-       ctx = MALLOC(sizeof(struct lzx_decompressor));
+       ctx = ALIGNED_MALLOC(sizeof(struct lzx_decompressor),
+                            DECODE_TABLE_ALIGNMENT);
        if (ctx == NULL)
                return WIMLIB_ERR_NOMEM;