mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
loader/dri3: simplify check for reply
if reply == NULL, the call `free(reply)` is a no-op, so we can have a single check instead of two. Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17974>
This commit is contained in:
parent
861167f41d
commit
f572961d69
1 changed files with 1 additions and 3 deletions
|
|
@ -1239,10 +1239,8 @@ loader_dri3_open(xcb_connection_t *conn,
|
|||
provider);
|
||||
|
||||
reply = xcb_dri3_open_reply(conn, cookie, NULL);
|
||||
if (!reply)
|
||||
return -1;
|
||||
|
||||
if (reply->nfd != 1) {
|
||||
if (!reply || reply->nfd != 1) {
|
||||
free(reply);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue