From: Eric Biggers Date: Tue, 5 Aug 2014 01:57:03 +0000 (-0500) Subject: extract.c: Fix dereference of NULL in memory exhausted path X-Git-Tag: v1.7.1~11 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=24f13cb8e265b848c4633e0adb91d4f25a618743;ds=sidebyside extract.c: Fix dereference of NULL in memory exhausted path found_lte can be NULL here if the call to new_lookup_table_entry() failed. --- diff --git a/src/extract.c b/src/extract.c index 40e32964..fb96f13f 100644 --- a/src/extract.c +++ b/src/extract.c @@ -269,7 +269,7 @@ load_streams_from_pipe(struct apply_ctx *ctx, } ret = 0; out: - if (found_lte->resource_location != RESOURCE_IN_WIM) + if (found_lte && found_lte->resource_location != RESOURCE_IN_WIM) FREE(rspec); free_lookup_table_entry(found_lte); return ret;