xserver: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Feb 23 17:38:28 UTC 2025
glamor/glamor_gradient.c | 12 ++++--------
hw/xwin/winclipboard/xevents.c | 3 +--
2 files changed, 5 insertions(+), 10 deletions(-)
New commits:
commit 573d70ae25cf3b83b5ceee5f76d6d571b06f4b62
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Thu Feb 20 14:12:44 2025 +0100
xwin: don't need NULL check before free()
free() is safe against NULL arguments.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1818>
diff --git a/hw/xwin/winclipboard/xevents.c b/hw/xwin/winclipboard/xevents.c
index cac17153f..6a846902e 100644
--- a/hw/xwin/winclipboard/xevents.c
+++ b/hw/xwin/winclipboard/xevents.c
@@ -637,8 +637,7 @@ winClipboardFlushXEvents(HWND hwnd,
if (xtpText_value) {
free(xtpText_value);
}
- if (pszConvertData)
- free(pszConvertData);
+ free(pszConvertData);
if (hGlobal && pszGlobalData)
GlobalUnlock(hGlobal);
commit eafec5836a3d41b23a4c190adc30a08896034b08
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Thu Feb 20 14:11:51 2025 +0100
glamor: don't need NULL check before free()
free() is safe against NULL arguments.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1818>
diff --git a/glamor/glamor_gradient.c b/glamor/glamor_gradient.c
index 558e14311..7c22ccdb2 100644
--- a/glamor/glamor_gradient.c
+++ b/glamor/glamor_gradient.c
@@ -1110,10 +1110,8 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen,
}
if (stops_count > RADIAL_SMALL_STOPS) {
- if (n_stops)
- free(n_stops);
- if (stop_colors)
- free(stop_colors);
+ free(n_stops);
+ free(stop_colors);
}
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
@@ -1454,10 +1452,8 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
}
if (stops_count > LINEAR_SMALL_STOPS) {
- if (n_stops)
- free(n_stops);
- if (stop_colors)
- free(stop_colors);
+ free(n_stops);
+ free(stop_colors);
}
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
More information about the xorg-commit
mailing list