1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-10 21:38:50 +01:00

gpgscm: Free memory backing string ports.

* tests/gpgscm/scheme.c (finalize_cell): Free memory backing string
ports.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-06-30 12:35:27 +02:00
parent d4ede89981
commit 599ad21104

View File

@ -1390,6 +1390,8 @@ static void finalize_cell(scheme *sc, pointer a) {
if(a->_object._port->kind&port_file if(a->_object._port->kind&port_file
&& a->_object._port->rep.stdio.closeit) { && a->_object._port->rep.stdio.closeit) {
port_close(sc,a,port_input|port_output); 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); sc->free(a->_object._port);
} else if(is_foreign_object(a)) { } else if(is_foreign_object(a)) {