gpgscm: Free memory backing string ports.
authorJustus Winter <justus@g10code.com>
Thu, 30 Jun 2016 10:35:27 +0000 (12:35 +0200)
committerJustus Winter <justus@g10code.com>
Thu, 30 Jun 2016 13:31:37 +0000 (15:31 +0200)
* tests/gpgscm/scheme.c (finalize_cell): Free memory backing string
ports.

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

index 4c28230..5f2f205 100644 (file)
@@ -1390,6 +1390,8 @@ static void finalize_cell(scheme *sc, pointer a) {
     if(a->_object._port->kind&port_file
        && a->_object._port->rep.stdio.closeit) {
       port_close(sc,a,port_input|port_output);
+    } else if (a->_object._port->kind & port_srfi6) {
+      sc->free(a->_object._port->rep.string.start);
     }
     sc->free(a->_object._port);
   } else if(is_foreign_object(a)) {