[Xcb-commit] doc
Julien Danjou
jdanjou at kemper.freedesktop.org
Tue Dec 8 00:41:40 PST 2009
doc/tutorial/index.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 1e746fd89ae93965183c759b969ff9f4d5dbc9d8
Author: Jim Ingram <ingramj at gmail.com>
Date: Mon Dec 7 14:41:18 2009 -0600
Tutorial code fix
Accessed elements of names[] after freeing them in the first example.
Signed-off-by: Julien Danjou <julien at danjou.info>
diff --git a/doc/tutorial/index.html b/doc/tutorial/index.html
index 5824807..aa3ae17 100644
--- a/doc/tutorial/index.html
+++ b/doc/tutorial/index.html
@@ -471,8 +471,6 @@ main ()
diff = end - start;
/* free var */
- for (i = 0; i < count; ++i)
- free (names[i]);
free (atoms);
free (cs);
@@ -494,6 +492,8 @@ main ()
printf ("ratio : %f\n", diff_x / diff);
free (atoms_x);
+ for (i = 0; i < count; ++i)
+ free (names[i]);
free (names);
XCloseDisplay (disp);
More information about the xcb-commit
mailing list