zte: plug memleak

The GError wasn't properly disposed.

Reported by: Ben Chan <benchan@google.com>
This commit is contained in:
Aleksander Morgado
2012-08-09 09:33:23 +02:00
parent 1e286f80ea
commit 1e687337c1
+4
View File
@@ -96,9 +96,13 @@ cpms_try_ready (MMBaseModem *self,
MM_MOBILE_EQUIPMENT_ERROR_SIM_BUSY)) {
/* Retry in 2 seconds */
g_timeout_add_seconds (2, (GSourceFunc)cpms_timeout_cb, ctx);
g_error_free (error);
return;
}
if (error)
g_error_free (error);
/* Well, we're done */
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
modem_after_sim_unlock_context_complete_and_free (ctx);