diff --git a/apps/dsm/mods/mod_conference/ModConference.cpp b/apps/dsm/mods/mod_conference/ModConference.cpp index 7e579cb1..6c0bb660 100644 --- a/apps/dsm/mods/mod_conference/ModConference.cpp +++ b/apps/dsm/mods/mod_conference/ModConference.cpp @@ -229,7 +229,15 @@ EXEC_ACTION_START(ConfRejoinAction) { } if (ConferenceJoinChannel(&chan, sess, sc_sess, channel_id, mode)) { - sc_sess->CLR_ERRNO; + /* save channel for later use */ + AmArg c_arg; + c_arg.setBorrowedPointer(chan); + sc_sess->avar[CONF_AKEY_CHANNEL] = std::move(c_arg); + + /* add to garbage collector */ + sc_sess->transferOwnership(chan); + + sc_sess->CLR_ERRNO; } else { sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG); }