glamor: don't need NULL check before free()
free() is safe against NULL arguments. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1818>
This commit is contained in:
parent
e4e3b69626
commit
eafec5836a
|
@ -1110,10 +1110,8 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stops_count > RADIAL_SMALL_STOPS) {
|
if (stops_count > RADIAL_SMALL_STOPS) {
|
||||||
if (n_stops)
|
free(n_stops);
|
||||||
free(n_stops);
|
free(stop_colors);
|
||||||
if (stop_colors)
|
|
||||||
free(stop_colors);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
|
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
|
||||||
|
@ -1454,10 +1452,8 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stops_count > LINEAR_SMALL_STOPS) {
|
if (stops_count > LINEAR_SMALL_STOPS) {
|
||||||
if (n_stops)
|
free(n_stops);
|
||||||
free(n_stops);
|
free(stop_colors);
|
||||||
if (stop_colors)
|
|
||||||
free(stop_colors);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
|
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
|
||||||
|
|
Loading…
Reference in New Issue