aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-18 02:12:00 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-18 02:12:00 +0300
commitbb9cba01679421fd8a61e41a94e2df33047164bc (patch)
treed6095b705c845c444ddeadf6e26130c0e1398fa1
parent296678662a6090f353a52a2b11080fbb9d1fc50d (diff)
input/e1d: fix a memleak in handle_ts_raw_read()
-rw-r--r--src/input/e1d.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/input/e1d.c b/src/input/e1d.c
index a959b40..ddd1bc4 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -232,6 +232,7 @@ static int handle_ts_raw_read(struct osmo_fd *bfd)
ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE);
if (ret < 0 || ret != D_TSX_ALLOC_SIZE) {
LOGPITS(e1i_ts, DLINP, LOGL_DEBUG, "read error %d %s\n", ret, strerror(errno));
+ msgb_free(msg);
return ret;
}