]> wimlib.net Git - wimlib/commitdiff
extract.c: Fix dereference of NULL in memory exhausted path
authorEric Biggers <ebiggers3@gmail.com>
Tue, 5 Aug 2014 01:57:03 +0000 (20:57 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 5 Aug 2014 01:57:53 +0000 (20:57 -0500)
found_lte can be NULL here if the call to new_lookup_table_entry()
failed.

src/extract.c

index 40e3296484a18fcbef0d0e624bfcd6117d8f24e0..fb96f13f8723bf26d0e24f9acfd4e9d051bb22c6 100644 (file)
@@ -269,7 +269,7 @@ load_streams_from_pipe(struct apply_ctx *ctx,
        }
        ret = 0;
 out:
        }
        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;
                FREE(rspec);
        free_lookup_table_entry(found_lte);
        return ret;