diff options
author | Lukas Larsson <[email protected]> | 2015-08-18 16:18:42 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2015-08-18 16:21:18 +0200 |
commit | d2bb1ca56dcd0ab8e5b43c4368409317c3ddd4db (patch) | |
tree | f0870810d5bc2ec4fa372c879b297f775f98c5b7 /erts/emulator/drivers/unix | |
parent | 61828f77ca2542109ece006d730a4f8fe3300616 (diff) | |
download | otp-d2bb1ca56dcd0ab8e5b43c4368409317c3ddd4db.tar.gz otp-d2bb1ca56dcd0ab8e5b43c4368409317c3ddd4db.tar.bz2 otp-d2bb1ca56dcd0ab8e5b43c4368409317c3ddd4db.zip |
erts: Fix binary memory leak in ttsl driver
Diffstat (limited to 'erts/emulator/drivers/unix')
-rw-r--r-- | erts/emulator/drivers/unix/ttsl_drv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/drivers/unix/ttsl_drv.c b/erts/emulator/drivers/unix/ttsl_drv.c index 0f773b69fb..53146e71f0 100644 --- a/erts/emulator/drivers/unix/ttsl_drv.c +++ b/erts/emulator/drivers/unix/ttsl_drv.c @@ -720,6 +720,7 @@ static void ttysl_from_erlang(ErlDrvData ttysl_data, char* buf, ErlDrvSizeT coun } driver_enq_bin(ttysl_port,putcbuf,0,putcpos); + driver_free_binary(putcbuf); if (sz == 0) { for (;;) { @@ -1207,6 +1208,7 @@ static int outc(int c) putcbuf->orig_bytes[putcpos++] = c; if (putcpos == putclen) { driver_enq_bin(ttysl_port,putcbuf,0,putclen); + driver_free_binary(putcbuf); putcpos = 0; putclen = TTY_BUFFSIZE; putcbuf = driver_alloc_binary(BUFSIZ); |