summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>2016-07-30 02:31:10 +0200
committerEric Anholt <eric@anholt.net>2016-08-03 10:25:09 -0700
commitfd32868590c7cbc5c6c2b3d59ff66694de3864b8 (patch)
tree4c65a57867f7cf270fa901af2fed62e0efe82be2
parenta0671d67def9e83ae511f758091b87d4ac34bea4 (diff)
downloadexternal_mesa3d-fd32868590c7cbc5c6c2b3d59ff66694de3864b8.zip
external_mesa3d-fd32868590c7cbc5c6c2b3d59ff66694de3864b8.tar.gz
external_mesa3d-fd32868590c7cbc5c6c2b3d59ff66694de3864b8.tar.bz2
loader: fix memory leak in loader_dri3_open
Found via "valgrind --leak-check=full glxgears". Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0x9b@gmail.com> Acked-by: Boyan Ding <boyan.j.ding@gmail.com> Cc: "12.0 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r--src/loader/loader_dri3_helper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 896f225..67d0c2c 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -785,6 +785,7 @@ loader_dri3_open(xcb_connection_t *conn,
}
fd = xcb_dri3_open_reply_fds(conn, reply)[0];
+ free(reply);
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
return fd;