Skip to content

Commit

Permalink
tm: check T just in case before UNREF
Browse files Browse the repository at this point in the history
Related #3156
  • Loading branch information
linuxmaniac committed Jul 6, 2022
1 parent 504695d commit dedd7ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/tm/t_funcs.h
Expand Up @@ -110,7 +110,7 @@ int send_pr_buffer( struct retr_buf *rb, void *buf, int len);

#define UNREF_NOSTATS(_T_cell) \
do{\
if (atomic_dec_and_test(&(_T_cell)->ref_count)){ \
if (_T_cell && atomic_dec_and_test(&(_T_cell)->ref_count)){ \
unlink_timers((_T_cell)); \
free_cell((_T_cell)); \
}\
Expand Down

0 comments on commit dedd7ee

Please sign in to comment.