pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/38504?usp=email )


Change subject: tun: assert tundev!=NULL in osmo_tundev_send
......................................................................

tun: assert tundev!=NULL in osmo_tundev_send

Change-Id: I892052f665d77bd01ac5a05649f8de40936f097f
---
M src/core/tun.c
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/38504/1

diff --git a/src/core/tun.c b/src/core/tun.c
index 28cec34..09a3f81 100644
--- a/src/core/tun.c
+++ b/src/core/tun.c
@@ -571,7 +571,10 @@
  */
 int osmo_tundev_send(struct osmo_tundev *tundev, struct msgb *msg)
 {
-       int rc = osmo_wqueue_enqueue(&tundev->wqueue, msg);
+       int rc;
+
+       OSMO_ASSERT(tundev);
+       rc = osmo_wqueue_enqueue(&tundev->wqueue, msg);
        if (rc < 0) {
                LOGTUN(tundev, LOGL_ERROR, "Failed to enqueue the packet\n");
                msgb_free(msg);

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38504?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I892052f665d77bd01ac5a05649f8de40936f097f
Gerrit-Change-Number: 38504
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to