if the net_name_type isn't 0,5,6 "net_name" isn't assigned new value
but it is freed again. Reset it to NULL after it is freed.
type 3(type 1 and 0 are ignored) network name may be returned instead of type 5
type 4(type 2 and 0 are ignored) network name may be returned instead of type 6
Change-Id: Id0fa47274d7415e5788a17be03ffe6d2ab1d0d47
break;
case 5: /* Short NITZ name*/
+ case 3: /* Short Network Name (CPHS) */
if ((pResp = tcore_at_tok_nth(tokens, 1))) {
if (strlen(pResp) > 0) {
net_name = tcore_at_tok_extract((const char *)pResp);
break;
case 6: /* Full NITZ name */
+ case 4: /* Long Network Name (CPHS) */
if ((pResp = tcore_at_tok_nth(tokens, 1))) {
if (strlen(pResp) > 0) {
net_name = tcore_at_tok_extract((const char *)pResp);
}
g_free(net_name);
+ net_name = NULL;
}
tcore_at_tok_free(tokens);