osmo-bts[master]: rsl: Fix dropping of LAPDm UA message.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Jan 25 11:38:07 UTC 2017


Patch Set 3: Code-Review-1

(1 comment)

I don't think this is ready for a merge yet, sorry.

https://gerrit.osmocom.org/#/c/1626/3/src/common/rsl.c
File src/common/rsl.c:

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-MessageType: comment
Gerrit-Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
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>
Gerrit-HasComments: Yes


More information about the gerrit-log mailing list