summaryrefslogtreecommitdiff
path: root/doc/tutorial
diff options
context:
space:
mode:
authorJim Ingram <ingramj@gmail.com>2009-12-07 14:41:18 -0600
committerJulien Danjou <julien@danjou.info>2009-12-08 09:41:26 +0100
commit1e746fd89ae93965183c759b969ff9f4d5dbc9d8 (patch)
treeb0e140e91ec859a3fc801addee223a28e9d8050e /doc/tutorial
parenta470579ba29c8f39e77668558a08bb173297711f (diff)
Tutorial code fix
Accessed elements of names[] after freeing them in the first example. Signed-off-by: Julien Danjou <julien@danjou.info>
Diffstat (limited to 'doc/tutorial')
-rw-r--r--doc/tutorial/index.html4
1 files changed, 2 insertions, 2 deletions
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 &lt; 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 &lt; count; ++i)
+ free (names[i]);
free (names);
XCloseDisplay (disp);