diff options
author | Emil Velikov <[email protected]> | 2016-05-14 16:33:11 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-05-23 12:07:46 +0100 |
commit | ed3f6ccce0f4fdc25705dd8c0beea8e9325db57f (patch) | |
tree | 207283feb74d4ba75b0a827d6b4e6a27fe28d177 /src/gallium/state_trackers/xa | |
parent | 6e00a1e6cba7b32e575521c7a92aae18761e0a37 (diff) |
st/xa: don't call close(-1) in xa_tracker_create error path
Analogous to previous commit.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/xa')
-rw-r--r-- | src/gallium/state_trackers/xa/xa_tracker.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c index f09baed1d84..e091b083411 100644 --- a/src/gallium/state_trackers/xa/xa_tracker.c +++ b/src/gallium/state_trackers/xa/xa_tracker.c @@ -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; } |