sim: Fix use of uninitialized values

In the case of an error, sim_pin_query_cb should not assume the
pin_type value is valid.
This commit is contained in:
Denis Kenzior 2012-06-19 12:57:53 -05:00
parent d69269b77f
commit 72ce19bf3e
1 changed files with 1 additions and 3 deletions

View File

@ -2689,8 +2689,7 @@ static void sim_pin_query_cb(const struct ofono_error *error,
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
ofono_error("Querying PIN authentication state failed");
goto checkdone;
return;
}
if (sim->pin_type != pin_type) {
@ -2728,7 +2727,6 @@ static void sim_pin_query_cb(const struct ofono_error *error,
sim_pin_retries_check(sim);
checkdone:
switch (pin_type) {
case OFONO_SIM_PASSWORD_SIM_PIN2:
case OFONO_SIM_PASSWORD_SIM_PUK2: