Fix segfault
authorMark Spencer <markster@digium.com>
Thu, 11 Nov 2004 19:55:09 +0000 (19:55 +0000)
committerMark Spencer <markster@digium.com>
Thu, 11 Nov 2004 19:55:09 +0000 (19:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4207 65c4cc65-6c06-0410-ace0-fbb531ad65f3

rtp.c

diff --git a/rtp.c b/rtp.c
index 89b653f..b198311 100755 (executable)
--- a/rtp.c
+++ b/rtp.c
@@ -493,14 +493,14 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
            if (rtp->lasteventseqn <= seqno) {
              f = process_rfc2833(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen);
              rtp->lasteventseqn = seqno;
-           }
+           } else f = NULL;
            if (f) return f; else return &null_frame;
          } else if (rtpPT.code == AST_RTP_CISCO_DTMF) {
            /* It's really special -- process it the Cisco way */
            if (rtp->lasteventseqn <= seqno) {
              f = process_cisco_dtmf(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen);
              rtp->lasteventseqn = seqno;
-           }
+           } else f = NULL;
            if (f) return f; else return &null_frame;
          } else if (rtpPT.code == AST_RTP_CN) {
            /* Comfort Noise */