[Xcb-commit] tutorial.mdwn
XCB site
xcb at freedesktop.org
Sun Sep 21 05:48:59 PDT 2008
tutorial.mdwn | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 083c949d6ce1d40f0fcffb114b51cb4adc49dcbc
Author: XCB site <xcb at freedesktop.org>
Date: Sun Sep 21 05:48:56 2008 -0700
web commit by nicolas: sample code bug: if (reply) { ... } free(reply) ==> if (reply) { ...; free(reply); }
diff --git a/tutorial.mdwn b/tutorial.mdwn
index 805d746..dbb599a 100644
--- a/tutorial.mdwn
+++ b/tutorial.mdwn
@@ -156,8 +156,8 @@ Here is a program that computes the time to create 500 atoms with Xlib and XCB.
if (reply) {
atoms[i] = reply->atom;
+ free (reply);
}
- free(reply);
}
// now we have our atoms (replies), but this is just a demo, so we do nothing with them
@@ -192,8 +192,8 @@ Here is a program that computes the time to create 500 atoms with Xlib and XCB.
if (reply) {
atoms[i] = reply->atom;
+ free (reply);
}
- free (reply);
}
// now we have our atoms (replies), but this is just a demo, so we do nothing with them
@@ -231,6 +231,8 @@ Here is a program that computes the time to create 500 atoms with Xlib and XCB.
XCloseDisplay (display);
+
+
/* test XCB */
xcb_connection_t *connection = xcb_connect (NULL, NULL);
More information about the xcb-commit
mailing list