Skip to contentSkip to conversation

lte: fix early imsi free

PATCH Applied Dragos Tatulea 2 participants 2 messages Nov 22, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lte: fix early imsi free

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(-)
src/lte.c +3 -3
index 82da868..518103a 100644
@@ -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);
 }
 
Signature · 1 line
2.7.4
#1 lore raw

Hi Dragos,

Quoted 8 lines · Dragos Tatulea

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(-)

Looks like I screwed this one up. Thanks for fixing this.

Applied.

Regards,
-Denis