From 89127266c93083521d71d8f2314ac88905163fd8 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sat, 1 Aug 2020 14:10:33 +0200 Subject: [PATCH] * test/data/emacs-module/mod-test.c (Fmod_test_string_a_to_b): Fix leak --- test/data/emacs-module/mod-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c index f72b85a5d8e..37186fcc4d1 100644 --- a/test/data/emacs-module/mod-test.c +++ b/test/data/emacs-module/mod-test.c @@ -262,7 +262,9 @@ Fmod_test_string_a_to_b (emacs_env *env, ptrdiff_t nargs, emacs_value args[], if (buf[i] == 'a') buf[i] = 'b'; - return env->make_string (env, buf, size - 1); + emacs_value ret = env->make_string (env, buf, size - 1); + free (buf); + return ret; } -- 2.39.2