diff options
author | Dave Airlie <[email protected]> | 2014-09-01 19:44:19 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2014-09-06 10:24:25 +1000 |
commit | 291ae622fd723d5ee2e08bbb8256c51bb5bce008 (patch) | |
tree | 682f97acffed1f5084847bd899f2de7bbdba3e09 /src | |
parent | 196e949cf78013aaccdb526a8d59b6a6e4ec5c1b (diff) |
loader: fds can be 0
Possible resource leak reported by coverity.
Reported-by: Coverity scanner.
Reviewed-by: Kenneth Graunke <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/loader/loader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c index 47e1f58746c..bdd39069149 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -402,7 +402,7 @@ int loader_get_user_preferred_fd(int default_fd, int *different_device) } fd = drm_open_device(device_name); - if (fd > 0) { + if (fd >= 0) { close(default_fd); } else { fd = default_fd; |