Skip to content

Commit 3713752

Browse files
authored
Fixed Coverity warning in conference (#4489)
1 parent 7f17633 commit 3713752

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pjmedia/src/pjmedia/conference.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ static pj_status_t create_conf_port( pj_pool_t *parent_pool,
392392
const pj_str_t *name,
393393
struct conf_port **p_conf_port)
394394
{
395-
struct conf_port *conf_port;
395+
struct conf_port *conf_port = NULL;
396396
pj_pool_t *pool = NULL;
397397
char pname[PJ_MAX_OBJ_NAME];
398398
pj_status_t status = PJ_SUCCESS;
@@ -608,10 +608,10 @@ static pj_status_t create_conf_port( pj_pool_t *parent_pool,
608608
on_return:
609609
if (status != PJ_SUCCESS) {
610610
/* Destroy resample if this conf port has it. */
611-
if (conf_port->rx_resample)
611+
if (conf_port && conf_port->rx_resample)
612612
pjmedia_resample_destroy(conf_port->rx_resample);
613613

614-
if (conf_port->tx_resample)
614+
if (conf_port && conf_port->tx_resample)
615615
pjmedia_resample_destroy(conf_port->tx_resample);
616616

617617
if (pool)

0 commit comments

Comments
 (0)