ref: d1c94b434d4a72b0ebc0d2cecaff33b2994b66ca
parent: ee9fc21fd6b7e50706fa093b9ccabd6dd56b02db
parent: 756d1ea6f14dc70e84bd22ed7f127e02e2faf855
author: Simon Howard <fraggle@soulsphere.org>
date: Mon Oct 7 18:24:17 EDT 2019
Merge pull request #1201 from TsarFox/master 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("");