From f8c90f03b8f4cd8caaf8e16a63bf37e38489614f Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Thu, 27 Oct 2005 21:57:53 +0000
Subject: [PATCH] Fix CDR crash (bug #5525 and many others)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 cdr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cdr.c b/cdr.c
index f65a516fa2..2020e09eac 100755
--- a/cdr.c
+++ b/cdr.c
@@ -170,6 +170,7 @@ struct ast_cdr *ast_cdr_dup(struct ast_cdr *cdr)
 	/* The varshead is unusable, volatile even, after the memcpy so we take care of that here */
 	memset(&newcdr->varshead, 0, sizeof(newcdr->varshead));
 	ast_cdr_copy_vars(newcdr, cdr);
+	newcdr->next = NULL;
 
 	return newcdr;
 }
-- 
GitLab