MT#55283 use obj_release macro

Change-Id: Ib81eec1bdd615ccdbea819634629c27a4bf45195
pull/1776/head
Richard Fuchs 2 years ago
parent 2b41188286
commit 5bd94a1cc2

@ -319,8 +319,7 @@ INLINE void call_unlock_release_update(call_t **c) {
return;
rwlock_unlock_w(&(*c)->master_lock);
redis_update_onekey(*c, rtpe_redis_write);
obj_put(*c);
*c = NULL;
obj_release(*c);
}
@ -2101,8 +2100,7 @@ static const char *call_offer_answer_ng(ng_buffer *ngbuf, bencode_item_t *input,
errstr = "Ran out of ports";
call_destroy(call);
}
obj_put(call);
call = NULL;
obj_release(call);
if (ret)
goto out;

@ -1501,8 +1501,7 @@ static void cli_incoming_call(str *instr, struct cli_writer *cw) {
if (cw->call) {
rwlock_unlock_w(&cw->call->master_lock);
obj_put(cw->call);
cw->call = NULL;
obj_release(cw->call);
}
}
@ -1516,8 +1515,7 @@ static void cli_incoming_call_terminate(str *instr, struct cli_writer *cw) {
ilog(LOG_WARN, "Call " STR_FORMAT_M " terminated by operator", STR_FMT_M(&cw->call->callid));
rwlock_unlock_w(&cw->call->master_lock);
call_destroy(cw->call);
obj_put(cw->call);
cw->call = NULL;
obj_release(cw->call);
}
static void cli_incoming_call_debug(str *instr, struct cli_writer *cw) {
str_shift(instr, 1);

@ -3544,9 +3544,7 @@ static void __dtx_shutdown(struct dtx_buffer *dtxb) {
if (dtxb->csh)
obj_put(&dtxb->csh->h);
dtxb->csh = NULL;
if (dtxb->call)
obj_put(dtxb->call);
dtxb->call = NULL;
obj_release(dtxb->call);
t_queue_clear_full(&dtxb->packets, dtx_packet_free);
}
static void __delay_buffer_shutdown(struct delay_buffer *dbuf, bool flush) {
@ -3558,9 +3556,7 @@ static void __delay_buffer_shutdown(struct delay_buffer *dbuf, bool flush) {
}
else
t_queue_clear_full(&dbuf->frames, delay_frame_free);
if (dbuf->call)
obj_put(dbuf->call);
dbuf->call = NULL;
obj_release(dbuf->call);
}
static void __dtx_free(void *p) {
struct dtx_buffer *dtxb = p;

Loading…
Cancel
Save