gsmtap_util: Remove msg_free from the wq call back
authorSylvain Munaut <tnt@246tNt.com>
Sun, 29 May 2011 17:48:15 +0000 (19:48 +0200)
committerSylvain Munaut <tnt@246tNt.com>
Sun, 29 May 2011 17:48:15 +0000 (19:48 +0200)
write_queue already frees the message after the callback is called.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
src/gsmtap_util.c

index 3d20bfc..9545865 100644 (file)
@@ -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;
 }