st/nine: do not double-close the fd on teardown
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 29 Aug 2018 17:13:13 +0000 (18:13 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 3 Oct 2018 12:38:05 +0000 (13:38 +0100)
As the newly introduced comment says:
 The pipe loader takes ownership of the fd

Thus, there's no need to close it again.

Cc: Patrick Rudolph <siro@das-labor.org>
Cc: Axel Davy <davyaxel0@gmail.com>
Cc: mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/targets/d3dadapter9/drm.c

index 85b3e10633e208bbe8f271a86fdf6278d6c18092..a2a36dbbda99dc2ddc46370004e0f323ee6499bf 100644 (file)
@@ -107,7 +107,7 @@ drm_destroy( struct d3dadapter9_context *ctx )
     if (drm->dev)
         pipe_loader_release(&drm->dev, 1);
 
-    close(drm->fd);
+    /* The pipe loader takes ownership of the fd */
     FREE(ctx);
 }