Skip to content

Commit

Permalink
rtpengine: make sure second call does not crash
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Mar 23, 2018
1 parent 583a651 commit aca09b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/rtpengine/rtpengine.c
Expand Up @@ -2239,6 +2239,8 @@ static int rtpe_fetch_stats(struct sip_msg *msg, bencode_buffer_t *retbuf, benco
if (ctx) {
/* allocate stats now */
if (ctx->stats) {
if (ctx->stats->dict) /* there was a previous run and resulted in an error */
return -1;
*retbuf = ctx->stats->buf;
*retdict = ctx->stats->dict;
return 1;
Expand Down

0 comments on commit aca09b4

Please sign in to comment.