Commit be5b1296 authored by runge's avatar runge

libvncserver/{main.c,rfbserver.c}: fix a couple more CopyRect memory leaks

parent 320edc79
......@@ -164,6 +164,7 @@ void rfbDoCopyRegion(rfbScreenInfoPtr screen,sraRegionPtr copyRegion,int dx,int
memmove(out,in,widthInBytes);
}
}
sraRgnReleaseIterator(i);
rfbScheduleCopyRegion(screen,copyRegion,dx,dy);
}
......
......@@ -1315,8 +1315,6 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
goto updateFailed;
}
sraRgnDestroy(updateCopyRegion);
for(i = sraRgnGetIterator(updateRegion); sraRgnIteratorNext(i,&rect);){
int x = rect.x1;
int y = rect.y1;
......@@ -1381,6 +1379,7 @@ updateFailed:
if(i)
sraRgnReleaseIterator(i);
sraRgnDestroy(updateRegion);
sraRgnDestroy(updateCopyRegion);
return result;
}
......@@ -1434,6 +1433,7 @@ rfbSendCopyRegion(cl, reg, dx, dy)
+= sz_rfbFramebufferUpdateRectHeader + sz_rfbCopyRect;
}
sraRgnReleaseIterator(i);
return TRUE;
}
......
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