}
asprintf(&(registration_state[0]), "%d", state);
- registration_state[1] = strdup(lac);
- registration_state[2] = strdup(cid);
+ if(lac != NULL)
+ registration_state[1] = strdup(lac);
+ if(cid != NULL)
+ registration_state[2] = strdup(cid);
return 0;
}