ref: 756d1ea6f14dc70e84bd22ed7f127e02e2faf855
parent: ee9fc21fd6b7e50706fa093b9ccabd6dd56b02db
author: Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>
date: Sun Oct 6 01:21:06 EDT 2019
Use SDL_free with SDL pointers.
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -2185,11 +2185,14 @@
// Vanilla Doom and save in the current directory.
char *result;
+ char *copy;
result = SDL_GetPrefPath("", PACKAGE_TARNAME);
if (result != NULL)
{
- return result;
+ copy = M_StringDuplicate(result);
+ SDL_free(result);
+ return copy;
}
#endif /* #ifndef _WIN32 */
return M_StringDuplicate("");