Fix TCP mode memory leak
authorfatbob313 <martin@fatbob.nu>
Tue, 17 Nov 2009 21:17:04 +0000 (21:17 +0000)
committerfatbob313 <martin@fatbob.nu>
Tue, 17 Nov 2009 21:17:04 +0000 (21:17 +0000)
src/client.c

index ce9af73bc0c900acde5a3633acbda21a985d7feb..1994364c18153e4b708b567776888af229034aa4 100644 (file)
@@ -527,10 +527,14 @@ static void Client_voiceMsg_tunnel(client_t *client, message_t *msg)
        Pds_add_numval(pds, msg->sessionId);
        Pds_add_numval(pds, msg->payload.speex.seq);
        Pds_append_data_nosize(pds, msg->payload.speex.data, msg->payload.speex.size);
+       
+       Msg_free(msg);
+       
        if (!pds->bOk)
                Log_warn("Large Speex message from TCP"); /* XXX - pds resize? */
        pds->maxsize = pds->offset;
        Client_voiceMsg(client, pds);
+       
        Pds_free(pds);
 }