summaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-06-08 06:52:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-06-08 06:52:06 -0700
commitf50c31c9571d96dcd6ec3880e12f0357a56bbcb6 (patch)
tree147441aa6ad9cbbdc54f2a2325597e120157d727 /socket.c
parent07b04ff7268a454ef8017270283d1c8f90c23ffc (diff)
downloadtxr-f50c31c9571d96dcd6ec3880e12f0357a56bbcb6.tar.gz
txr-f50c31c9571d96dcd6ec3880e12f0357a56bbcb6.tar.bz2
txr-f50c31c9571d96dcd6ec3880e12f0357a56bbcb6.zip
Fix memory leak in dgram socket streams.
* socket.c (dgram_destroy): Free the dgram_stream structure too, not just its buffers.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index 568de50e..9f17b09f 100644
--- a/socket.c
+++ b/socket.c
@@ -345,6 +345,7 @@ static void dgram_destroy(val stream)
free(d->rx_buf);
free(d->tx_buf);
d->rx_buf = d->tx_buf = 0;
+ free(d);
}
static void dgram_overflow(val stream)