{
struct callerid_state *cid;
cid = malloc(sizeof(struct callerid_state));
- memset(cid, 0, sizeof(struct callerid_state));
if (cid) {
+ memset(cid, 0, sizeof(struct callerid_state));
cid->fskd.spb = 7; /* 1200 baud */
cid->fskd.hdlc = 0; /* Async */
cid->fskd.nbit = 8; /* 8 bits */
} else
ast_log(LOG_WARNING, "Unable to get caller ID space\n");
}
+ else
+ cs = NULL;
if (name && number) {
snprintf(cid, sizeof(cid), "\"%s\" <%s>", name, number);
} else if (name) {
} else {
strcpy(cid, "");
}
+ if (cs)
+ callerid_free(cs);
if (strlen(cid)) {
chan->callerid = strdup(cid);
chan->ani = strdup(cid);
return RESULT_SHOWUSAGE;
if (getenv("I_AM_NOT_AN_IDIOT") == NULL)
- ast_cli(fd, "Disclaimer: this command is for informational purposes
-only.\n\tIt does not indicate anything about your configuration.\n");
+ ast_cli(fd, "Disclaimer: this command is for informational purposes only.\n\tIt does not indicate anything about your configuration.\n");
if ((argc == 2) || (!strcasecmp(argv[1],"audio"))) {
found = 1;