projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbe363f
)
* test/data/emacs-module/mod-test.c (Fmod_test_string_a_to_b): Fix leak
author
Philipp Stephani
<phst@google.com>
Sat, 1 Aug 2020 12:10:33 +0000
(14:10 +0200)
committer
Philipp Stephani
<phst@google.com>
Sat, 1 Aug 2020 12:16:22 +0000
(14:16 +0200)
test/data/emacs-module/mod-test.c
patch
|
blob
|
history
diff --git
a/test/data/emacs-module/mod-test.c
b/test/data/emacs-module/mod-test.c
index f72b85a5d8e96d8366c3ec29d6b217a4c5e047e0..37186fcc4d1a572f3144367479b183524a293ff4 100644
(file)
--- 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;
}