Fix a memory leak upon errors

This commit is contained in:
Pierre Pronchery 2015-09-24 02:04:31 +02:00
parent ff9fda6a5c
commit 08163d9c99

View File

@ -1341,6 +1341,8 @@ static gboolean _on_watch_can_read(GIOChannel * source, GIOCondition condition,
break;
case G_IO_STATUS_ERROR:
_wpa_error(wpa, error->message, 1);
g_error_free(error);
/* fallback */
case G_IO_STATUS_EOF:
default: /* should not happen */
_wpa_reset(wpa);