diff options
Diffstat (limited to 'socket/udp-turn-over-tcp.c')
-rw-r--r-- | socket/udp-turn-over-tcp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/socket/udp-turn-over-tcp.c b/socket/udp-turn-over-tcp.c index fb788b3..52c1189 100644 --- a/socket/udp-turn-over-tcp.c +++ b/socket/udp-turn-over-tcp.c @@ -303,7 +303,7 @@ socket_send_message (NiceSocket *sock, const NiceAddress *to, /* Allocate a new array of buffers, covering all the buffers in the input * @message, but with an additional one for a header and one for a footer. */ - local_bufs = g_malloc_n (n_bufs + 1, sizeof (GOutputVector)); + local_bufs = g_alloca ((n_bufs + 1) * sizeof (GOutputVector)); local_message.buffers = local_bufs; local_message.n_buffers = n_bufs + 1; @@ -379,8 +379,6 @@ socket_send_message (NiceSocket *sock, const NiceAddress *to, if (ret == 1) ret = output_message_get_size (&local_message); - g_free (local_bufs); - return ret; } |