Fix potential memory leak in SDL_AddHintCallback

This commit is contained in:
Mathieu Eyraud authored and Sam Lantinga committed 2022-05-21 09:47:34 -07:00
1 parent e4b5afa576
commit fe46569cce
1 file changed
+1
+1
View File
@@ -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;