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> 2004-01-29 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* Honour the check for libz and libjpeg again. * Honour the check for libz and libjpeg again.
......
...@@ -1213,6 +1213,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion) ...@@ -1213,6 +1213,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
int h = rect.y2 - y; int h = rect.y2 - y;
nUpdateRegionRects += (((h-1) / (ZLIB_MAX_SIZE( w ) / w)) + 1); nUpdateRegionRects += (((h-1) / (ZLIB_MAX_SIZE( w ) / w)) + 1);
} }
sraRgnReleaseIterator(i);
#ifdef LIBVNCSERVER_HAVE_LIBJPEG #ifdef LIBVNCSERVER_HAVE_LIBJPEG
} else if (cl->preferredEncoding == rfbEncodingTight) { } else if (cl->preferredEncoding == rfbEncodingTight) {
nUpdateRegionRects = 0; nUpdateRegionRects = 0;
...@@ -1296,24 +1297,28 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion) ...@@ -1296,24 +1297,28 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
case rfbEncodingRaw: case rfbEncodingRaw:
if (!rfbSendRectEncodingRaw(cl, x, y, w, h)) { if (!rfbSendRectEncodingRaw(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion); sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE; return FALSE;
} }
break; break;
case rfbEncodingRRE: case rfbEncodingRRE:
if (!rfbSendRectEncodingRRE(cl, x, y, w, h)) { if (!rfbSendRectEncodingRRE(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion); sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE; return FALSE;
} }
break; break;
case rfbEncodingCoRRE: case rfbEncodingCoRRE:
if (!rfbSendRectEncodingCoRRE(cl, x, y, w, h)) { if (!rfbSendRectEncodingCoRRE(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion); sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE; return FALSE;
} }
break; break;
case rfbEncodingHextile: case rfbEncodingHextile:
if (!rfbSendRectEncodingHextile(cl, x, y, w, h)) { if (!rfbSendRectEncodingHextile(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion); sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE; return FALSE;
} }
break; break;
...@@ -1321,6 +1326,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion) ...@@ -1321,6 +1326,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
case rfbEncodingZlib: case rfbEncodingZlib:
if (!rfbSendRectEncodingZlib(cl, x, y, w, h)) { if (!rfbSendRectEncodingZlib(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion); sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE; return FALSE;
} }
break; break;
...@@ -1328,6 +1334,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion) ...@@ -1328,6 +1334,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
case rfbEncodingTight: case rfbEncodingTight:
if (!rfbSendRectEncodingTight(cl, x, y, w, h)) { if (!rfbSendRectEncodingTight(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion); sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE; return FALSE;
} }
break; break;
...@@ -1337,6 +1344,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion) ...@@ -1337,6 +1344,7 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
case rfbEncodingZRLE: case rfbEncodingZRLE:
if (!rfbSendRectEncodingZRLE(cl, x, y, w, h)) { if (!rfbSendRectEncodingZRLE(cl, x, y, w, h)) {
sraRgnDestroy(updateRegion); sraRgnDestroy(updateRegion);
sraRgnReleaseIterator(i);
return FALSE; return FALSE;
} }
break; 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