Commit ed3f6ccc authored by Emil Velikov's avatar Emil Velikov

st/xa: don't call close(-1) in xa_tracker_create error path

Analogous to previous commit.
Signed-off-by: Emil Velikov's avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Leo Liu's avatarLeo Liu <leo.liu@amd.com>
parent 6e00a1e6
......@@ -152,7 +152,7 @@ xa_tracker_create(int drm_fd)
struct xa_tracker *xa = calloc(1, sizeof(struct xa_tracker));
enum xa_surface_type stype;
unsigned int num_formats;
int fd = -1;
int fd;
if (!xa)
return NULL;
......@@ -212,9 +212,9 @@ xa_tracker_create(int drm_fd)
out_no_screen:
if (xa->dev)
pipe_loader_release(&xa->dev, 1);
fd = -1;
else
close(fd);
out_no_fd:
close(fd);
free(xa);
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment