aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-03-29 17:05:50 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-03-29 17:05:50 +0200
commit21dbca31c55c27095011869566a471b59b527f04 (patch)
tree7322ef3a69361fa625bdf4a01890dbb20775a417
parent2cf75c9364300274bcb131d2a6adf50eab12831d (diff)
downloadtoolame-dab-21dbca31c55c27095011869566a471b59b527f04.tar.gz
toolame-dab-21dbca31c55c27095011869566a471b59b527f04.tar.bz2
toolame-dab-21dbca31c55c27095011869566a471b59b527f04.zip
Fix memory leak in zmq output
-rw-r--r--zmqoutput.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zmqoutput.c b/zmqoutput.c
index 61360ad..1345bfd 100644
--- a/zmqoutput.c
+++ b/zmqoutput.c
@@ -70,6 +70,9 @@ int zmqoutput_write_byte(Bit_stream_struc *bs, unsigned char data)
int send_error = zmq_send(bs->zmq_sock, header, frame_length,
ZMQ_DONTWAIT);
+ free(header);
+ header = NULL;
+
if (send_error < 0) {
fprintf(stderr, "ZeroMQ send failed! %s\n", zmq_strerror(errno));
}