From fb8910faf71d963bdcac7a507865eabe01254eb0 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. --- doc/tutorial/index.html | 4 ++-- 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 < 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); -- 1.6.3.3