From 1e746fd89ae93965183c759b969ff9f4d5dbc9d8 Mon Sep 17 00:00:00 2001 From: Jim Ingram Date: Mon, 7 Dec 2009 14:41:18 -0600 Subject: [PATCH] Tutorial code fix Accessed elements of names[] after freeing them in the first example. Signed-off-by: Julien Danjou --- doc/tutorial/index.html | 4 ++-- 1 file 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 < 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); -- 2.34.1