pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31810 )
Change subject: sndcp: Avoid propagating rc=1 ......................................................................
sndcp: Avoid propagating rc=1
Those functions guarantee to the caller that the prim is always freed, and hence returning 1 has not meaning there.
Fix similar to bab234c2ea13b1ffa81bdb2c19a5864746b21390 in rlcmac layer.
Change-Id: If3c9287d839198dc079993c4d32780fb1c2bc6fd --- M src/sndcp/sndcp_prim.c 1 file changed, 18 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved
diff --git a/src/sndcp/sndcp_prim.c b/src/sndcp/sndcp_prim.c index 63591d7..dee7dbe 100644 --- a/src/sndcp/sndcp_prim.c +++ b/src/sndcp/sndcp_prim.c @@ -533,6 +533,8 @@ /* Special return value '1' means: do not free */ if (rc != 1) msgb_free(msg); + else + rc = 0; return rc; }
@@ -676,5 +678,7 @@ /* Special return value '1' means: do not free */ if (rc != 1) msgb_free(msg); + else + rc = 0; return rc; }