File: fix-a-use-after-free-error-in-tickit_win.patch

package info (click to toggle)
libtickit 0.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,556 kB
  • sloc: ansic: 13,904; perl: 228; makefile: 161; sh: 38
file content (23 lines) | stat: -rw-r--r-- 651 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Niko Tyni <ntyni@debian.org>
Date: Sun, 11 Aug 2024 10:56:07 +0100
X-Dgit-Generated: 0.4.3-2 77113fa081c5badfe3c5b109bb2d782f841408ec
Subject: Fix a use-after-free error in tickit_window_destroy()

Bug-Debian: https://bugs.debian.org/1078154

---

diff --git a/src/window.c b/src/window.c
index 89594dd..7248d2d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -379,8 +379,8 @@ void tickit_window_destroy(TickitWindow *win)
   for(TickitWindow *child = win->first_child; child; /**/) {
     TickitWindow *next = child->next;
 
-    tickit_window_unref(child);
     child->parent = NULL;
+    tickit_window_unref(child);
     child = next;
   }