[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8912726 1/2: * test/data/emacs-module/mod-test.c (Fmod_test_strin
From: |
Philipp Stephani |
Subject: |
master 8912726 1/2: * test/data/emacs-module/mod-test.c (Fmod_test_string_a_to_b): Fix leak |
Date: |
Sat, 1 Aug 2020 08:31:00 -0400 (EDT) |
branch: master
commit 89127266c93083521d71d8f2314ac88905163fd8
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>
* 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 f72b85a..37186fc 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;
}