diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-06-19 12:57:53 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-06-19 12:59:42 -0500 |
commit | 72ce19bf3e87b5e73c053f7ea1095a5006f1aea9 (patch) | |
tree | 4fab7d000b64362f8f75be3b8603a5decc6728a3 /src | |
parent | d69269b77ff20e5c294a9816f0254f5b8829dfae (diff) | |
download | ofono-72ce19bf3e87b5e73c053f7ea1095a5006f1aea9.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/sim.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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: |