projects
/
free-sw
/
xcb
/
libxcb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a470579
)
Tutorial code fix
author
Jim Ingram
<ingramj@gmail.com>
Mon, 7 Dec 2009 20:41:18 +0000
(14:41 -0600)
committer
Julien Danjou
<julien@danjou.info>
Tue, 8 Dec 2009 08:41:26 +0000
(09:41 +0100)
Accessed elements of names[] after freeing them in the first example.
Signed-off-by: Julien Danjou <julien@danjou.info>
doc/tutorial/index.html
patch
|
blob
|
history
diff --git
a/doc/tutorial/index.html
b/doc/tutorial/index.html
index
5824807
..
aa3ae17
100644
(file)
--- 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);