# SDL: testautomation\_hints.c: free hint memory

**URL:** <https://discourse.libsdl.org/t/sdl-testautomation-hints-c-free-hint-memory/44236>\
**Category:** SDL Commits\
**Created:** [June 13, 2023, 9:14pm UTC](https://discourse.libsdl.org/t/sdl-testautomation-hints-c-free-hint-memory/44236 "2023-06-13T21:14:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [June 13, 2023, 9:14pm UTC](https://discourse.libsdl.org/t/sdl-testautomation-hints-c-free-hint-memory/44236/1 "2023-06-13T21:14:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/0f24956b0af20c8dc3bde9bc1c921f2d127297be>

```diff
From 0f24956b0af20c8dc3bde9bc1c921f2d127297be Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Tue, 13 Jun 2023 23:10:29 +0200
Subject: [PATCH] testautomation_hints.c: free hint memory

---
 test/testautomation_hints.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/testautomation_hints.c b/test/testautomation_hints.c
index aa65e276add3..c1244b82b59f 100644
--- a/test/testautomation_hints.c
+++ b/test/testautomation_hints.c
@@ -214,6 +214,7 @@ static int hints_setHint(void *arg)
         callbackValue && SDL_strcmp(callbackValue, "original") == 0,
         "callbackValue = %s, expected \"original\"",
         callbackValue);
+ SDL_free(callbackValue);
 
     SDLTest_AssertPass("Call to SDL_SetHintWithPriority(\"temp\", SDL_HINT_OVERRIDE), using callback after reset");
     callbackValue = NULL;

```
