winsys/radeon: don't leak the fd when it is 0
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 29 Jul 2015 14:44:32 +0000 (15:44 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 1 Aug 2015 14:44:17 +0000 (15:44 +0100)
commit1307be519b8785249ee863a22115930299ff642a
tree15ef28d906b75870537afd671da3409e55ee4cc0
parenteb3e2562a4bf728082818b46dcae1ab88340786e
winsys/radeon: don't leak the fd when it is 0

Earlier commit added an extra dup(fd) to fix a ZaphodHeads issue.
Although it did not consider the (very unlikely) case where we might end
up with the valid fd == 0.

Fixes: 28dda47ae4d(winsys/radeon: Use dup fd as key in drm-winsys hash
table to fix ZaphodHeads.)

Cc: 10.6 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c