Fix potential memory leak in SDL_AddHintCallback
diff --git a/src/SDL_hints.c b/src/SDL_hints.c
index d3fc8ab..0005f49 100644
--- a/src/SDL_hints.c
+++ b/src/SDL_hints.c
@@ -179,6 +179,7 @@ SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
}
hint->name = SDL_strdup(name);
if (!hint->name) {
+ SDL_free(entry);
SDL_free(hint);
SDL_OutOfMemory();
return;