Alan Coopersmith
21cbc56c43
Xext/xselinux: avoid memory leak in SELinuxAtomToSID()
Reported in #1817:
xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:142:13: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’
xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:133:1: enter_function: entry to ‘SELinuxAtomToSID’
xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:141:15: acquire_memory: allocated here
xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:69:12: branch_true: following ‘true’ branch...
xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:142:13: danger: ‘rec’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
# 140| if (!rec) {
# 141| rec = calloc(1, sizeof(SELinuxAtomRec));
# 142|-> if (!rec || !SELinuxArraySet(&arr_atoms, atom, rec))
# 143| return BadAlloc;
# 144| }
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2072>
2025-10-07 23:23:07 +00:00
..
2025-02-06 22:28:49 +00:00
2025-06-17 20:54:49 +00:00
2017-03-27 15:59:47 -04:00
2025-06-24 11:23:14 -07:00
2025-06-24 11:23:14 -07:00
2024-10-10 13:38:31 +00:00
2020-07-05 13:07:33 -07:00
2025-06-24 11:23:14 -07:00
2025-09-20 16:45:59 -07:00
2024-06-23 19:31:46 +00:00
2024-10-26 16:35:57 +00:00
2014-01-12 10:24:11 -08:00
2025-02-06 22:28:51 +00:00
2025-09-06 17:01:39 +00:00
2025-06-17 20:54:49 +00:00
2024-06-23 19:20:12 +00:00
2025-08-19 23:56:27 +00:00
2025-10-07 23:23:05 +00:00
2013-11-14 10:22:15 +09:00
2024-10-10 13:38:31 +00:00
2014-01-12 10:24:11 -08:00
2025-10-07 23:23:07 +00:00
2019-04-17 14:01:17 -07:00
2017-09-20 13:19:27 -04:00
2025-10-07 23:23:07 +00:00
2025-02-18 10:53:44 +00:00
2025-10-05 11:56:48 -07:00
2014-01-12 10:24:11 -08:00
2025-02-06 22:28:52 +00:00
2025-08-10 10:09:14 -07:00
2025-10-07 23:23:07 +00:00
2025-10-07 23:23:07 +00:00
2024-10-10 13:45:29 +00:00
2025-10-07 23:23:07 +00:00
2024-03-25 19:40:04 +00:00
2024-03-03 23:20:06 +00:00
2025-06-17 20:54:49 +00:00
2025-02-06 22:28:52 +00:00
2025-02-07 10:08:41 +01:00
2025-02-07 10:08:41 +01:00
2025-02-06 23:02:06 +00:00
2025-06-22 09:17:25 -07:00
2024-10-10 19:59:48 +00:00