aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/src/gprs/gb_proxy.c4
-rw-r--r--openbsc/src/gprs/gprs_ns.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index 7203a4bc2..ffaf24060 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -491,10 +491,6 @@ int gbprox_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci)
}
}
- /* We free the original message here, as we will have created a
- * copy in case it is forwarded to another peer */
- msgb_free(msg);
-
return rc;
}
diff --git a/openbsc/src/gprs/gprs_ns.c b/openbsc/src/gprs/gprs_ns.c
index 1b9d7c6d5..11637f7fa 100644
--- a/openbsc/src/gprs/gprs_ns.c
+++ b/openbsc/src/gprs/gprs_ns.c
@@ -793,7 +793,11 @@ static int handle_nsip_read(struct bsc_fd *bfd)
if (!msg)
return error;
- return gprs_ns_rcvmsg(nsi, msg, &saddr);
+ error = gprs_ns_rcvmsg(nsi, msg, &saddr);
+
+ msgb_free(msg);
+
+ return error;
}
static int handle_nsip_write(struct bsc_fd *bfd)