pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/31809 )


Change subject: llc: Avoid propagating rc=1
......................................................................

llc: 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: Icdee1cac4df970ae2ee7539d72c5a82667016160
---
M src/llc/llc_prim.c
1 file changed, 18 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/09/31809/1

diff --git a/src/llc/llc_prim.c b/src/llc/llc_prim.c
index b5fab8f..fd3578e 100644
--- a/src/llc/llc_prim.c
+++ b/src/llc/llc_prim.c
@@ -183,6 +183,8 @@
        /* Special return value '1' means: do not free */
        if (rc != 1)
                msgb_free(llc_prim->oph.msg);
+       else
+               rc = 0;
        return rc;
 }

@@ -212,5 +214,7 @@
        /* Special return value '1' means: do not free */
        if (rc != 1)
                msgb_free(msg);
+       else
+               rc = 0;
        return rc;
 }

--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31809
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Icdee1cac4df970ae2ee7539d72c5a82667016160
Gerrit-Change-Number: 31809
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to