summaryrefslogtreecommitdiffstats
path: root/src/gsmtap_util.c
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2011-05-29 19:48:15 +0200
committerSylvain Munaut <tnt@246tNt.com>2011-05-29 19:48:15 +0200
commit3710e462f85824cd9d84b3f95e6b2ea694119ff9 (patch)
treea7fc409a173aa362a5bf4f0d034494c7a3790f55 /src/gsmtap_util.c
parentf2699501bc20a1dc5ee965ca1cbb8f18a3471ff8 (diff)
gsmtap_util: Remove msg_free from the wq call back
write_queue already frees the message after the callback is called. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/gsmtap_util.c')
-rw-r--r--src/gsmtap_util.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c
index 3d20bfc2..95458657 100644
--- a/src/gsmtap_util.c
+++ b/src/gsmtap_util.c
@@ -197,16 +197,13 @@ static int gsmtap_wq_w_cb(struct osmo_fd *ofd, struct msgb *msg)
rc = write(ofd->fd, msg->data, msg->len);
if (rc < 0) {
perror("writing msgb to gsmtap fd");
- msgb_free(msg);
return rc;
}
if (rc != msg->len) {
perror("short write to gsmtap fd");
- msgb_free(msg);
return -EIO;
}
- msgb_free(msg);
return 0;
}