From: Philipp Stephani Date: Sat, 1 Aug 2020 12:10:33 +0000 (+0200) Subject: * test/data/emacs-module/mod-test.c (Fmod_test_string_a_to_b): Fix leak X-Git-Tag: emacs-28.0.90~6883 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89127266c93083521d71d8f2314ac88905163fd8;p=emacs.git * test/data/emacs-module/mod-test.c (Fmod_test_string_a_to_b): Fix leak --- 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; }