summaryrefslogtreecommitdiff
path: root/tutorial.mdwn
diff options
context:
space:
mode:
authorXCB site <xcb@freedesktop.org>2008-09-21 05:48:56 -0700
committerXCB site <xcb@freedesktop.org>2008-09-21 05:48:56 -0700
commit083c949d6ce1d40f0fcffb114b51cb4adc49dcbc (patch)
treeff5a5028103a5cb6309b88b3727416275536c74e /tutorial.mdwn
parentfc831383478bd3a11e2f10253406c06374802254 (diff)
web commit by nicolas: sample code bug: if (reply) { ... } free(reply) ==> if (reply) { ...; free(reply); }
Diffstat (limited to 'tutorial.mdwn')
-rw-r--r--tutorial.mdwn6
1 files changed, 4 insertions, 2 deletions
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);