Przeglądaj źródła

Fix shared memory leak

The MIT-SHM documentation:
  https://www.x.org/releases/X11R7.7/doc/xextproto/shm.html
says to run XShmDetach() first, and then to destroy the segment.

(cherry picked from commit 585ee24d4c)
pull/1722/head
Adam Halim 11 miesięcy temu
rodzic
commit
43d844eca4
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1
    1
      unix/x0vncserver/Image.cxx

+ 1
- 1
unix/x0vncserver/Image.cxx Wyświetl plik

@@ -312,8 +312,8 @@ void ShmImage::Init(int width, int height, const XVisualInfo *vinfo)

ShmImage::~ShmImage()
{
// FIXME: Destroy image as described in MIT-SHM documentation.
if (shminfo != NULL) {
XShmDetach(dpy, shminfo);
shmdt(shminfo->shmaddr);
shmctl(shminfo->shmid, IPC_RMID, 0);
delete shminfo;

Ładowanie…
Anuluj
Zapisz