[sr-dev] git:4.1: dmq: fixed crash caused by freeing pointer too early on tm callback