osmo-bts[master]: rsl: Fix dropping of LAPDm UA message.
gerrit-no-reply at lists.osmocom.org
Wed Jan 25 11:38:07 UTC 2017
Patch Set 3: Code-Review-1
I don't think this is ready for a merge yet, sorry.
Line 2297: lchan->pending_rel_ind.marker = 1;
why do we have the marker? It seems like all it tells us is that there is a 'msg' attached. so we could just as well check on if (lchan->pending_rel_ind.msg) and get rid of the marker? NULL means there is no message pending, non-NULL means there is a message pending?
Also, how do we avoid memory leaks in the current code? We blindly set pending_rel_ind.msg = msg without detecting if any previous msg was already stored. So if there was, we loose a reference to it -> mem leak. Either free any previous msg here (and/or at time the lchan is destroyed), or even go as far as to ASSERT that there is never already a pending_rel_ind.msg here.
To view, visit https://gerrit.osmocom.org/1626
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Minh-Quang Nguyen <minh-quang.nguyen at nutaq.com>
More information about the gerrit-log