From: Jim Ingram Date: Mon, 7 Dec 2009 20:41:18 +0000 (-0600) Subject: Tutorial code fix X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e746fd89ae93965183c759b969ff9f4d5dbc9d8;hp=a470579ba29c8f39e77668558a08bb173297711f;p=free-sw%2Fxcb%2Flibxcb Tutorial code fix Accessed elements of names[] after freeing them in the first example. Signed-off-by: Julien Danjou --- 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);