summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ziak <[email protected]>2016-07-30 02:31:10 +0200
committerEric Anholt <[email protected]>2016-08-03 10:25:09 -0700
commitfd32868590c7cbc5c6c2b3d59ff66694de3864b8 (patch)
tree4c65a57867f7cf270fa901af2fed62e0efe82be2
parenta0671d67def9e83ae511f758091b87d4ac34bea4 (diff)
loader: fix memory leak in loader_dri3_open
Found via "valgrind --leak-check=full glxgears". Signed-off-by: Jan Ziak (http://atom-symbol.net) <[email protected]> Acked-by: Boyan Ding <[email protected]> Cc: "12.0 11.2" <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
-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 896f2252f36..67d0c2c2f3a 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;