From 2d6f0c4607ab6ed6dd3315fce8bbe18ceb13046a Mon Sep 17 00:00:00 2001
From: Tilghman Lesher <tilghman@meg.abyt.es>
Date: Tue, 9 Feb 2010 18:06:30 +0000
Subject: [PATCH] Ensure frames are only freed once.

(closes issue #16361)
 Reported by: vlad
 Patches:
       20100208__issue16361.diff.txt uploaded by tilghman (license 14)
 Tested by: kenny, bloodoff, misaksen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_fax.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/apps/app_fax.c b/apps/app_fax.c
index ede2044373..a5afe87dde 100644
--- a/apps/app_fax.c
+++ b/apps/app_fax.c
@@ -559,6 +559,7 @@ static int transmit_audio(fax_session *s)
 		}
 
 		ast_frfree(inf);
+		inf = NULL;
 	}
 
 	ast_debug(1, "Loop finished, res=%d\n", res);
@@ -698,6 +699,7 @@ static int transmit_t38(fax_session *s)
 		}
 
 		ast_frfree(inf);
+		inf = NULL;
 	}
 
 	ast_debug(1, "Loop finished, res=%d\n", res);
-- 
GitLab