foxygit / doom Log in
commit 485b939b9b01e00ab47cd34a9de4a4e901d96a33
Author:     Alex Mayfield <alexmax2742@gmail.com>
AuthorDate: Mon Jul 15 22:08:53 2019 -0400
Commit:     Alex Mayfield <alexmax2742@gmail.com>
CommitDate: Mon Jul 15 22:08:53 2019 -0400

    Use SDL_free with SDL pointers
---
 src/m_config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/m_config.c b/src/m_config.c
index db4a9298..ce05a050 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -2261,7 +2261,7 @@ void M_SetMusicPackDir(void)

     free(readme_path);
     free(music_pack_path);
-    free(prefdir);
+    SDL_free(prefdir);
 }

 //
@@ -2344,7 +2344,7 @@ char *M_GetAutoloadDir(const char *iwadname)
         char *prefdir;
         prefdir = SDL_GetPrefPath("", PACKAGE_TARNAME);
         autoload_path = M_StringJoin(prefdir, "autoload", NULL);
-        free(prefdir);
+        SDL_free(prefdir);
     }

     M_MakeDirectory(autoload_path);