mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 00:00:09 +00:00
Bug 6529 - memory leak in ast_play_and_prepend
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
app.c
2
app.c
@@ -847,6 +847,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
|
|||||||
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
|
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
|
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
|
||||||
|
ast_dsp_free(sildet);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -951,6 +952,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
|
|||||||
} else {
|
} else {
|
||||||
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", prependfile, sfmt[x]);
|
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", prependfile, sfmt[x]);
|
||||||
}
|
}
|
||||||
|
ast_dsp_free(sildet);
|
||||||
*duration = end - start;
|
*duration = end - start;
|
||||||
#if 0
|
#if 0
|
||||||
if (outmsg > 1) {
|
if (outmsg > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user