hsomodem: Remove useless NULL checks before g_free

This commit is contained in:
Marcel Holtmann 2010-08-16 22:08:08 +02:00
parent 41133da001
commit f284f3542b
1 changed files with 3 additions and 6 deletions

View File

@ -140,8 +140,7 @@ static void hso_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
hso_owancall_up_cb, ncbd, g_free) > 0)
return;
if (ncbd)
g_free(ncbd);
g_free(ncbd);
gcd->active_context = 0;
@ -187,8 +186,7 @@ static void hso_gprs_activate_primary(struct ofono_gprs_context *gc,
hso_cgdcont_cb, cbd, g_free) > 0)
return;
error:
if (cbd)
g_free(cbd);
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, NULL, 0, NULL, NULL, NULL, NULL, data);
}
@ -213,8 +211,7 @@ static void hso_gprs_deactivate_primary(struct ofono_gprs_context *gc,
return;
error:
if (cbd)
g_free(cbd);
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);
}