automerge commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@33062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Automerge script
2006-06-08 17:04:02 +00:00
parent ec8919adcf
commit 6fcb0a1a43
+12 -2
View File
@@ -324,15 +324,25 @@ struct ast_frame *ast_frisolate(struct ast_frame *fr)
out = fr;
if (!(fr->mallocd & AST_MALLOCD_SRC)) {
if (fr->src)
if (fr->src) {
out->src = strdup(fr->src);
if (!out->src) {
if (out != fr)
free(out);
ast_log(LOG_WARNING, "Out of memory\n");
return NULL;
}
}
} else
out->src = fr->src;
if (!(fr->mallocd & AST_MALLOCD_DATA)) {
newdata = malloc(fr->datalen + AST_FRIENDLY_OFFSET);
if (!newdata) {
free(out);
if (out->src != fr->src)
free((void *) out->src);
if (out != fr)
free(out);
ast_log(LOG_WARNING, "Out of memory\n");
return NULL;
}