diff options
-rw-r--r-- | libvncserver/main.c | 1 | ||||
-rw-r--r-- | libvncserver/rfbserver.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libvncserver/main.c b/libvncserver/main.c index 4e59c98..bec7e2f 100644 --- a/libvncserver/main.c +++ b/libvncserver/main.c @@ -164,6 +164,7 @@ void rfbDoCopyRegion(rfbScreenInfoPtr screen,sraRegionPtr copyRegion,int dx,int memmove(out,in,widthInBytes); } } + sraRgnReleaseIterator(i); rfbScheduleCopyRegion(screen,copyRegion,dx,dy); } diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 7790522..f3aaa30 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -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; } |