From 9caa83c38e6d572cc7ca068b08a87d86b3b86f35 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Fri, 6 Apr 2018 19:15:56 +0300 Subject: [PATCH] clean cppcheck warning [addons/chan_ooh323.c:5056] -> [addons/chan_ooh323.c:5037]: (warning) Either the condition 'if(dfr)' is redundant or there is possible null pointer dereference: dfr. [addons/chan_ooh323.c:5056] -> [addons/chan_ooh323.c:5039]: (warning) Either the condition 'if(dfr)' is redundant or there is possible null pointer dereference: dfr. [addons/chan_ooh323.c:5056] -> [addons/chan_ooh323.c:5045]: (warning) Either the condition 'if(dfr)' is redundant or there is possible null pointer dereference: dfr. Signed-off-by: Ilya Shipitsin --- addons/chan_ooh323.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index ffdbf67211..24cc65c0f6 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -5053,9 +5053,7 @@ struct ast_frame *ooh323_rtp_read(struct ast_channel *ast, struct ooh323_pvt *p) ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", ast_channel_name(p->owner),target_context); } p->faxdetected = 1; - if (dfr) { - ast_frfree(dfr); - } + ast_frfree(dfr); return &ast_null_frame; } } -- 2.11.0