All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lte: fix early imsi free
@ 2016-11-22 13:00 Dragos Tatulea
  2016-11-22 16:04 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Dragos Tatulea @ 2016-11-22 13:00 UTC (permalink / raw)
  To: ofono

[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-22 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-22 13:00 [PATCH] lte: fix early imsi free Dragos Tatulea
2016-11-22 16:04 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.