Skip to content

Commit

Permalink
rtpengine: fix some coverity warnings
Browse files Browse the repository at this point in the history
CID #211356 and #199981
  • Loading branch information
razvancrainea committed Jul 9, 2020
1 parent 0d069a1 commit f382678
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/rtpengine/rtpengine.c
Expand Up @@ -2761,8 +2761,9 @@ static int rtpe_fetch_stats(struct sip_msg *msg, bencode_buffer_t *retbuf, benco
LM_ERR("not enough pkg for stats!\n");
/* cannot store stats */
ctx = NULL;
} else {
memset(ctx->stats, 0, sizeof *ctx->stats);
}
memset(ctx->stats, 0, sizeof *ctx->stats);
}

dict = rtpe_function_call_ok(&bencbuf, msg, OP_QUERY, NULL, NULL, NULL);
Expand Down Expand Up @@ -3519,6 +3520,7 @@ static void rtpengine_notify_process(int rank)

p = shm_malloc(ret + 1);
if (!p) {
/* coverity[string_null] - false positive CID #211356 */
LM_ERR("could not allocate %d for buffer %.*s\n", ret, ret, buffer);
continue;
}
Expand Down

0 comments on commit f382678

Please sign in to comment.