diff options
| author | Po Lu | 2022-03-26 19:38:30 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-26 19:38:30 +0800 |
| commit | a3ed1d2590c2acd041dfc9a783daa240fddfc11d (patch) | |
| tree | c9c5d6c0acf0ce9f48ec298dd6d94ae94a710863 /src | |
| parent | 0594e9126167c64c8315c1e44d3f61c530259755 (diff) | |
| download | emacs-a3ed1d2590c2acd041dfc9a783daa240fddfc11d.tar.gz emacs-a3ed1d2590c2acd041dfc9a783daa240fddfc11d.zip | |
; * src/xterm.c (x_dnd_compute_toplevels): Fix cookie leak if rc is 0.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 9d66181de40..fb201f85065 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1288,6 +1288,39 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) | |||
| 1288 | 1288 | ||
| 1289 | x_dnd_toplevels = tem; | 1289 | x_dnd_toplevels = tem; |
| 1290 | } | 1290 | } |
| 1291 | else | ||
| 1292 | { | ||
| 1293 | #ifdef HAVE_XCB_SHAPE | ||
| 1294 | if (dpyinfo->xshape_supported_p) | ||
| 1295 | { | ||
| 1296 | bounding_rect_reply = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, | ||
| 1297 | bounding_rect_cookies[i], | ||
| 1298 | &error); | ||
| 1299 | |||
| 1300 | if (bounding_rect_reply) | ||
| 1301 | free (bounding_rect_reply); | ||
| 1302 | else | ||
| 1303 | free (error); | ||
| 1304 | } | ||
| 1305 | #endif | ||
| 1306 | |||
| 1307 | #ifdef HAVE_XCB_SHAPE_INPUT_RECTS | ||
| 1308 | if (dpyinfo->xshape_supported_p | ||
| 1309 | && (dpyinfo->xshape_major > 1 | ||
| 1310 | || (dpyinfo->xshape_major == 1 | ||
| 1311 | && dpyinfo->xshape_minor >= 1))) | ||
| 1312 | { | ||
| 1313 | input_rect_reply = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, | ||
| 1314 | input_rect_cookies[i], | ||
| 1315 | &error); | ||
| 1316 | |||
| 1317 | if (input_rect_reply) | ||
| 1318 | free (input_rect_reply); | ||
| 1319 | else | ||
| 1320 | free (error); | ||
| 1321 | } | ||
| 1322 | #endif | ||
| 1323 | } | ||
| 1291 | 1324 | ||
| 1292 | #ifdef USE_XCB | 1325 | #ifdef USE_XCB |
| 1293 | if (attrs_reply) | 1326 | if (attrs_reply) |