From 1955526d45fd151551af4384b7d58515fea67f84 Mon Sep 17 00:00:00 2001 From: steven_carr Date: Sun, 28 May 2006 20:38:26 +0000 Subject: Plugged some memory leakage --- libvncserver/rre.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libvncserver/rre.c') diff --git a/libvncserver/rre.c b/libvncserver/rre.c index c0759aa..b43561a 100755 --- a/libvncserver/rre.c +++ b/libvncserver/rre.c @@ -48,6 +48,19 @@ static int subrectEncode32(uint32_t *data, int w, int h); static uint32_t getBgColour(char *data, int size, int bpp); +void rfbRRECleanup(rfbScreenInfoPtr screen) +{ + if (rreBeforeBufSize) { + free(rreBeforeBuf); + rreBeforeBufSize=0; + } + if (rreAfterBufSize) { + free(rreAfterBuf); + rreAfterBufSize=0; + } +} + + /* * rfbSendRectEncodingRRE - send a given rectangle using RRE encoding. */ -- cgit v1.2.1