shithub: choc

Download patch

ref: 485b939b9b01e00ab47cd34a9de4a4e901d96a33
parent: 5734001ad937559ea4bfb5be83b2d19fad04fa18
author: Alex Mayfield <alexmax2742@gmail.com>
date: Mon Jul 15 18:08:53 EDT 2019

Use SDL_free with SDL pointers

--- a/src/m_config.c
+++ b/src/m_config.c
@@ -2261,7 +2261,7 @@
 
     free(readme_path);
     free(music_pack_path);
-    free(prefdir);
+    SDL_free(prefdir);
 }
 
 //
@@ -2344,7 +2344,7 @@
         char *prefdir;
         prefdir = SDL_GetPrefPath("", PACKAGE_TARNAME);
         autoload_path = M_StringJoin(prefdir, "autoload", NULL);
-        free(prefdir);
+        SDL_free(prefdir);
     }
 
     M_MakeDirectory(autoload_path);