Taskbar: thumbnails (XShmGetImage - avoid leaking in X)
This commit is contained in:
parent
4b50446a7b
commit
cbf3cebbb0
1 changed files with 6 additions and 1 deletions
|
@ -536,6 +536,10 @@ cairo_surface_t *get_window_thumbnail_ximage(Window win, size_t size, gboolean u
|
|||
// 2nd pass
|
||||
smooth_thumbnail(result);
|
||||
|
||||
if (ximg) {
|
||||
XDestroyImage(ximg);
|
||||
ximg = NULL;
|
||||
}
|
||||
err4:
|
||||
if (use_shm)
|
||||
XShmDetach(server.display, &shminfo);
|
||||
|
@ -546,7 +550,8 @@ err2:
|
|||
if (use_shm)
|
||||
shmctl(shminfo.shmid, IPC_RMID, NULL);
|
||||
err1:
|
||||
XDestroyImage(ximg);
|
||||
if (ximg)
|
||||
XDestroyImage(ximg);
|
||||
err0:
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue