gui: widget-io: Fix cleanup code in widget_printf(), widget_scanf().
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 8 Apr 2011 04:05:31 +0000 (21:05 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 8 Apr 2011 04:05:31 +0000 (21:05 -0700)
The 'arg' member of arguments and the 'dir' member of char_directives
are only allocated from malloc() if there are more than fit in the
arrays that are included inside their respective structures, so they
must only be freed when that internal structure is not used.

Also, these arrays are allocated with malloc() and so must be freed
with free(), not g_free().

Thanks to Benoit Flippen <anagogue@gmail.com> for reporting the
problem.


No differences found