summaryrefslogtreecommitdiff
path: root/test/data
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2020-08-01 14:10:33 +0200
committerPhilipp Stephani <phst@google.com>2020-08-01 14:16:22 +0200
commit89127266c93083521d71d8f2314ac88905163fd8 (patch)
treea03ad15836af8fd2bda35c04b9a766fa9e1bf307 /test/data
parentfbe363f5e18fb4975de168191f1ee9b686e48d9f (diff)
downloademacs-89127266c93083521d71d8f2314ac88905163fd8.tar.gz
* test/data/emacs-module/mod-test.c (Fmod_test_string_a_to_b): Fix leak
Diffstat (limited to 'test/data')
-rw-r--r--test/data/emacs-module/mod-test.c4
1 files changed, 3 insertions, 1 deletions
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;
}