From: Dragos Tatulea <dragos@endocode.com>
To: ofono@ofono.org
Subject: [PATCH] lte: fix early imsi free
Date: Tue, 22 Nov 2016 14:00:14 +0100 [thread overview]
Message-ID: <1479819614-25999-1-git-send-email-dragos@endocode.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 835 bytes --]
storage_close was creating an empty sync file in /var/lib/ofono/lte
when it should have been closing the proper file
/var/lig/ofono/<imsi>/lte.
---
src/lte.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lte.c b/src/lte.c
index 82da868..518103a 100644
--- a/src/lte.c
+++ b/src/lte.c
@@ -259,9 +259,6 @@ static void lte_atom_remove(struct ofono_atom *atom)
if (lte == NULL)
return;
- g_free(lte->imsi);
- lte->imsi = NULL;
-
if (lte->settings) {
storage_close(lte->imsi, SETTINGS_STORE, lte->settings, TRUE);
lte->settings = NULL;
@@ -270,6 +267,9 @@ static void lte_atom_remove(struct ofono_atom *atom)
if (lte->driver && lte->driver->remove)
lte->driver->remove(lte);
+ g_free(lte->imsi);
+ lte->imsi = NULL;
+
g_free(lte);
}
--
2.7.4
next reply other threads:[~2016-11-22 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 13:00 Dragos Tatulea [this message]
2016-11-22 16:04 ` [PATCH] lte: fix early imsi free Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479819614-25999-1-git-send-email-dragos@endocode.com \
--to=dragos@endocode.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox