Commit 2fbf23c1 authored by dscho's avatar dscho

memory leaks fixed

parent e0cbabec
2004-01-30 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* Thanks to Paul Fox from Bright Star Engineering,
a few more memory leaks were fixed.
2004-01-29 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* Honour the check for libz and libjpeg again.
......
......@@ -1213,6 +1213,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
int h = rect.y2 - y;
nUpdateRegionRects += (((h-1) / (ZLIB_MAX_SIZE( w ) / w)) + 1);
}
sraRgnReleaseIterator(i);
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
} else if (cl->preferredEncoding == rfbEncodingTight) {
nUpdateRegionRects = 0;
......@@ -1296,24 +1297,28 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
case rfbEncodingRaw:
if (!rfbSendRectEncodingRaw(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE;
}
break;
case rfbEncodingRRE:
if (!rfbSendRectEncodingRRE(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE;
}
break;
case rfbEncodingCoRRE:
if (!rfbSendRectEncodingCoRRE(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE;
}
break;
case rfbEncodingHextile:
if (!rfbSendRectEncodingHextile(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE;
}
break;
......@@ -1321,6 +1326,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
case rfbEncodingZlib:
if (!rfbSendRectEncodingZlib(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE;
}
break;
......@@ -1328,6 +1334,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
case rfbEncodingTight:
if (!rfbSendRectEncodingTight(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE;
}
break;
......@@ -1337,6 +1344,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
case rfbEncodingZRLE:
if (!rfbSendRectEncodingZRLE(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE;
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment