diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-06-13 11:46:29 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-06-13 11:46:29 +0200 |
commit | f566935f7ac1a6c6d8cfc7745d483daabf21948e (patch) | |
tree | cdc848b378b5c6c7aec8bc25356392d9cef967fb | |
parent | 66c50b6a72bee8a56e6a5577874c197ff35b538e (diff) | |
download | ofono-f566935f7ac1a6c6d8cfc7745d483daabf21948e.tar.bz2 |
Fix memory leak introduced by HSO quirk
-rw-r--r-- | drivers/atmodem/sim.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c index 766c60b1..e722fbba 100644 --- a/drivers/atmodem/sim.c +++ b/drivers/atmodem/sim.c @@ -107,7 +107,7 @@ static void at_sim_read_info(struct ofono_sim *sim, int fileid, void *data) { struct sim_data *sd = ofono_sim_get_data(sim); - struct cb_data *cbd = cb_data_new(cb, data); + struct cb_data *cbd; char buf[64]; if (sd->vendor == OFONO_VENDOR_OPTION_HSO) { @@ -119,6 +119,7 @@ static void at_sim_read_info(struct ofono_sim *sim, int fileid, } } + cbd = cb_data_new(cb, data); if (!cbd) goto error; @@ -132,9 +133,6 @@ static void at_sim_read_info(struct ofono_sim *sim, int fileid, return; error: - if (cbd) - g_free(cbd); - CALLBACK_WITH_FAILURE(cb, -1, -1, -1, NULL, data); } |