summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-08-15 14:42:45 -0700
committerAlon Levy <alevy@redhat.com>2011-08-23 18:28:39 +0300
commit439993d7882bc5a9b1055553f30b8b18140b7f0d (patch)
tree78d472cc19f810f59ae9643ec074808ef2b5da16
parent6ef8d1e844950f6b4099569682618ff2590a096b (diff)
downloadspice-439993d7882bc5a9b1055553f30b8b18140b7f0d.tar.gz
spice-439993d7882bc5a9b1055553f30b8b18140b7f0d.tar.xz
spice-439993d7882bc5a9b1055553f30b8b18140b7f0d.zip
server/red_channel: release channel allocated message buffer
handler->cb->release_msg_buf was not being called except in the error path, causing a memory leak.
-rw-r--r--server/red_channel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index ae333aa7..3f47f7f7 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -141,6 +141,7 @@ static void red_peer_handle_incoming(RedsStream *stream, IncomingHandler *handle
handler->msg);
}
handler->msg_pos = 0;
+ handler->cb->release_msg_buf(handler->opaque, &handler->header, handler->msg);
handler->msg = NULL;
handler->header_pos = 0;