[farsight2/master] Allocate UdpSock using GSlice

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:22:33 PST 2008


---
 transmitters/multicast/fs-multicast-transmitter.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/transmitters/multicast/fs-multicast-transmitter.c b/transmitters/multicast/fs-multicast-transmitter.c
index 05ccee6..743f98c 100644
--- a/transmitters/multicast/fs-multicast-transmitter.c
+++ b/transmitters/multicast/fs-multicast-transmitter.c
@@ -805,7 +805,7 @@ fs_multicast_transmitter_get_udpsock (FsMulticastTransmitter *trans,
     }
   }
 
-  udpsock = g_new0 (UdpSock, 1);
+  udpsock = g_slice_new0 (UdpSock);
 
   udpsock->refcount = 1;
   udpsock->local_ip = g_strdup (local_ip);
@@ -916,7 +916,7 @@ fs_multicast_transmitter_put_udpsock (FsMulticastTransmitter *trans,
 
   g_free (udpsock->multicast_ip);
   g_free (udpsock->local_ip);
-  g_free (udpsock);
+  g_slice_free (UdpSock, udpsock);
 }
 
 void
-- 
1.5.6.5




More information about the farsight-commits mailing list