foxygit / doom Log in
commit d358269bb491b69b82dc6f6e986c8f56b8c1eb3e
Author:     Michael Francis <mikefrancis95@gmail.com>
AuthorDate: Mon Jan 27 07:57:55 2020 -0500
Commit:     GitHub <noreply@github.com>
CommitDate: Mon Jan 27 07:57:55 2020 -0500

    Fix memory leak when iwad not found (fix #1241)
---
 src/d_iwad.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/d_iwad.c b/src/d_iwad.c
index 4f62cd71..2f7d3099 100644
--- a/src/d_iwad.c
+++ b/src/d_iwad.c
@@ -787,6 +787,7 @@ char *D_FindWADByName(const char *name)
         {
             return probe;
         }
+        free(probe);

         // Construct a string for the full path