X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Flookup_table.c;h=ca7d8b5e340c0782663f8c65eef03469d08486e9;hp=11dd2a37dd7bdc5217fc102d4075a50c11b92ead;hb=f7bdd5469328cc6bced610ccabfc7f472a0b8870;hpb=1fc939b7bd0b37900d974b1cd5b11df128df71f5 diff --git a/src/lookup_table.c b/src/lookup_table.c index 11dd2a37..ca7d8b5e 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -656,7 +656,9 @@ read_wim_lookup_table(WIMStruct *wim) * resource. */ struct wim_lookup_table_entry *prev_entry = NULL; - if (back_to_back_pack) { + if (back_to_back_pack && + !list_empty(&cur_rspec->stream_list)) + { prev_entry = list_entry(cur_rspec->stream_list.prev, struct wim_lookup_table_entry, rspec_node); @@ -842,7 +844,7 @@ read_wim_lookup_table(WIMStruct *wim) goto out_free_buf; out_free_cur_entry: - FREE(cur_entry); + free_lookup_table_entry(cur_entry); out_free_lookup_table: free_lookup_table(table); out_free_buf: