gui: widget-io: Fix cleanup code in widget_printf(), widget_scanf().