X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fwim.c;h=2a6ac129d644eb4b437544171e117f25f81cc00a;hb=84aa21bf2722d14eff30fac2ec4904ed2ed6de52;hp=3676123a9b58ce8c8149d9633eed68d5c0bee24a;hpb=d4f8cc3998aebb08c6cd12d248173323b43c07b8;p=wimlib diff --git a/src/wim.c b/src/wim.c index 3676123a..2a6ac129 100644 --- a/src/wim.c +++ b/src/wim.c @@ -70,8 +70,8 @@ new_wim_struct(void) if (wim) { wim->in_fd.fd = -1; wim->out_fd.fd = -1; + INIT_LIST_HEAD(&wim->subwims); } - INIT_LIST_HEAD(&wim->subwims); return wim; } @@ -139,6 +139,7 @@ wimlib_create_new_wim(int ctype, WIMStruct **wim_ret) wim->lookup_table = table; wim->refcnts_ok = 1; wim->compression_type = ctype; + wim->out_compression_type = ctype; *wim_ret = wim; return 0; out_free: @@ -482,6 +483,7 @@ begin_read(WIMStruct *wim, const void *wim_filename_or_fd, } else { wim->compression_type = WIMLIB_COMPRESSION_TYPE_NONE; } + wim->out_compression_type = wim->compression_type; if (open_flags & WIMLIB_OPEN_FLAG_CHECK_INTEGRITY) { ret = check_wim_integrity(wim, progress_func); @@ -775,6 +777,7 @@ wimlib_free(WIMStruct *wim) if (filedes_valid(&wim->out_fd)) filedes_close(&wim->out_fd); + wimlib_lzx_free_context(wim->lzx_context); free_lookup_table(wim->lookup_table);