openbsc[master]: sgsn: Fix deeply flawed copying logic for PDP context activa...

Holger Freyther gerrit-no-reply at lists.osmocom.org
Thu Jan 26 11:02:45 UTC 2017


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/1686/1/openbsc/src/gprs/gprs_gmm.c
File openbsc/src/gprs/gprs_gmm.c:

Line 2172: 		talloc_free(lookup->orig_msg);
> Why the need for explicit free? Wouldn't freeing lookup will also free it's
Because it is not a member. The msgb is cloned before if it is clear if an async GGSN look-up will be made.

One could argue to use a talloc_steal to change the hierarchy but the project opinion is to delete all "members" by hand anyway.


Line 2395: 	*delete = 0;
> Why such a complexity? Can't we just return smth like -EBLAHBLAH, check for
There are too many returns in that method and returns by calling other methods. An out parameter seems better suited.


-- 
To view, visit https://gerrit.osmocom.org/1686
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-HasComments: Yes


More information about the gerrit-log mailing list