aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/scheme.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-06-28 16:10:01 +0000
committerJustus Winter <[email protected]>2016-06-28 16:21:50 +0000
commit6cb2be91a7cc8a9b8ec42f3956adbb19347318e3 (patch)
tree38d034c890f3d9dab6e841aa168194e8894ab373 /tests/gpgscm/scheme.c
parentgpgscm: Fix buffer overflow. (diff)
downloadgnupg-6cb2be91a7cc8a9b8ec42f3956adbb19347318e3.tar.gz
gnupg-6cb2be91a7cc8a9b8ec42f3956adbb19347318e3.zip
gpgscm: Free file names.
* tests/gpgscm/scheme.c (scheme_load_named_file): Free file name. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/gpgscm/scheme.c')
-rw-r--r--tests/gpgscm/scheme.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index aabf4008e..4c28230f1 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -4938,6 +4938,11 @@ void scheme_load_named_file(scheme *sc, FILE *fin, const char *filename) {
if(sc->retcode==0) {
sc->retcode=sc->nesting!=0;
}
+
+#if SHOW_ERROR_LINE
+ sc->free(sc->load_stack[0].rep.stdio.filename);
+ sc->load_stack[0].rep.stdio.filename = NULL;
+#endif
}
void scheme_load_string(scheme *sc, const char *cmd) {