diff options
Diffstat (limited to 'src/gsmtap_util.c')
-rw-r--r-- | src/gsmtap_util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 962782b5..b21c690b 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -303,6 +303,7 @@ int gsmtap_send_ex(struct gsmtap_inst *gti, uint8_t type, uint16_t arfcn, uint8_ unsigned int len) { struct msgb *msg; + int rc; if (!gti) return -ENODEV; @@ -312,7 +313,10 @@ int gsmtap_send_ex(struct gsmtap_inst *gti, uint8_t type, uint16_t arfcn, uint8_ if (!msg) return -ENOMEM; - return gsmtap_sendmsg(gti, msg); + rc = gsmtap_sendmsg(gti, msg); + if (rc) + msgb_free(msg); + return rc; } /*! send a message from L1/L2 through GSMTAP. |