Fix memory leak
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1403 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
70333591b2
commit
2e9487a9ba
|
@ -5189,7 +5189,7 @@ static struct ast_channel *zt_request(char *type, int format, void *data)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (data) {
|
if (data) {
|
||||||
dest = strdup((char *)data);
|
dest = strdupa((char *)data);
|
||||||
} else {
|
} else {
|
||||||
ast_log(LOG_WARNING, "Channel requested with no data\n");
|
ast_log(LOG_WARNING, "Channel requested with no data\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -5201,7 +5201,6 @@ static struct ast_channel *zt_request(char *type, int format, void *data)
|
||||||
s = strsep(&stringp, "/");
|
s = strsep(&stringp, "/");
|
||||||
if ((res = sscanf(s, "%d%c%d", &x, &opt, &y)) < 1) {
|
if ((res = sscanf(s, "%d%c%d", &x, &opt, &y)) < 1) {
|
||||||
ast_log(LOG_WARNING, "Unable to determine group for data %s\n", (char *)data);
|
ast_log(LOG_WARNING, "Unable to determine group for data %s\n", (char *)data);
|
||||||
free(dest);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
groupmatch = 1 << x;
|
groupmatch = 1 << x;
|
||||||
|
@ -5216,7 +5215,6 @@ static struct ast_channel *zt_request(char *type, int format, void *data)
|
||||||
x = CHAN_PSEUDO;
|
x = CHAN_PSEUDO;
|
||||||
} else if ((res = sscanf(s, "%d%c%d", &x, &opt, &y)) < 1) {
|
} else if ((res = sscanf(s, "%d%c%d", &x, &opt, &y)) < 1) {
|
||||||
ast_log(LOG_WARNING, "Unable to determine channel for data %s\n", (char *)data);
|
ast_log(LOG_WARNING, "Unable to determine channel for data %s\n", (char *)data);
|
||||||
free(dest);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
channelmatch = x;
|
channelmatch = x;
|
||||||
|
|
Reference in New Issue