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

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

Patch Set 1:

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
To unsubscribe, visit

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

More information about the gerrit-log mailing list