gpgscm: Free file names.
authorJustus Winter <justus@g10code.com>
Tue, 28 Jun 2016 16:10:01 +0000 (18:10 +0200)
committerJustus Winter <justus@g10code.com>
Tue, 28 Jun 2016 16:21:50 +0000 (18:21 +0200)
* tests/gpgscm/scheme.c (scheme_load_named_file): Free file name.

Signed-off-by: Justus Winter <justus@g10code.com>
tests/gpgscm/scheme.c

index aabf400..4c28230 100644 (file)
@@ -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) {