diff options
author | Philipp Stephani <phst@google.com> | 2020-08-01 14:10:33 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2020-08-01 14:16:22 +0200 |
commit | 89127266c93083521d71d8f2314ac88905163fd8 (patch) | |
tree | a03ad15836af8fd2bda35c04b9a766fa9e1bf307 /test/data | |
parent | fbe363f5e18fb4975de168191f1ee9b686e48d9f (diff) | |
download | emacs-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.c | 4 |
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; } |