wimlib_extract_flags(): Free memory used in linked extraction mode
authorEric Biggers <ebiggers3@gmail.com>
Sun, 29 Dec 2013 02:40:59 +0000 (20:40 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 29 Dec 2013 02:40:59 +0000 (20:40 -0600)
src/extract.c

index 5c2f0f7..44076db 100644 (file)
@@ -3246,6 +3246,14 @@ wimlib_extract_paths(WIMStruct *wim,
                                ~WIMLIB_EXTRACT_FLAG_GLOB_PATHS)
                                | WIMLIB_EXTRACT_FLAG_PATHMODE),
                            progress_func);
+
+       if (extract_flags & (WIMLIB_EXTRACT_FLAG_SYMLINK |
+                            WIMLIB_EXTRACT_FLAG_HARDLINK))
+       {
+               for_lookup_table_entry(wim->lookup_table,
+                                      lte_free_extracted_file,
+                                      NULL);
+       }
 out_free_trees:
        FREE(trees);
        return ret;