Subject: [PATCH] Fix heap-use-after-free in reference-ril.c found by
AddressSaniziter.

BUG=26012424

(cherry picked from commit 7c0165ee3b769ed6a67b58b7c6e2f60bd6f8fbf6)

Change-Id: I108f01229b5fe6a368129e608195ba5833f2ea91
diff --git a/reference-ril/reference-ril.c b/reference-ril/reference-ril.c
index 45340e3..b9baef1 100644
--- a/reference-ril/reference-ril.c
+++ b/reference-ril/reference-ril.c
@@ -3110,7 +3110,6 @@
 
         err = at_tok_nextstr(&p, &response);
 
-        free(line);
         if (err != 0) {
             RLOGE("invalid NITZ line %s\n", s);
         } else {
@@ -3118,6 +3117,7 @@
                 RIL_UNSOL_NITZ_TIME_RECEIVED,
                 response, strlen(response));
         }
+        free(line);
     } else if (strStartsWith(s,"+CRING:")
                 || strStartsWith(s,"RING")
                 || strStartsWith(s,"NO CARRIER")