Ensure frames are only freed once.
[asterisk/asterisk.git] / apps / app_fax.c
index ede2044..a5afe87 100644 (file)
@@ -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);