# HG changeset patch # User rosfran # Date 1166557684 0 # Node ID 0c4b132db3e790a2b291ae0046f38b4ec1021f86 # Parent 899d76d6cfc4a74688e814e42e3b9341ec302ab3 [svn r229] Memory usage cleaning-up. diff -r 899d76d6cfc4 -r 0c4b132db3e7 gmyth/src/gmyth_monitor_handler.c --- a/gmyth/src/gmyth_monitor_handler.c Tue Dec 19 19:46:07 2006 +0000 +++ b/gmyth/src/gmyth_monitor_handler.c Tue Dec 19 19:48:04 2006 +0000 @@ -164,6 +164,8 @@ { //g_thread_exit( monitor->monitor_th, TRUE, FALSE ); g_thread_exit( monitor->monitor_th ); + if ( monitor->monitor_th != NULL ) + g_object_unref( monitor->monitor_th ); monitor->monitor_th = NULL; } @@ -543,7 +545,7 @@ gboolean *ret = g_new0( gboolean, 1 ); *ret = TRUE; - if (!g_thread_supported () ) g_thread_init (NULL); + /*if (!g_thread_supported () ) g_thread_init (NULL);*/ monitor->monitor_th = g_thread_create( (GThreadFunc)gmyth_monitor_handler_listener, monitor, TRUE, NULL ); diff -r 899d76d6cfc4 -r 0c4b132db3e7 gmyth/src/gmyth_socket.c --- a/gmyth/src/gmyth_socket.c Tue Dec 19 19:46:07 2006 +0000 +++ b/gmyth/src/gmyth_socket.c Tue Dec 19 19:48:04 2006 +0000 @@ -116,7 +116,7 @@ gchar *portStr = NULL; gint errorn = EADDRNOTAVAIL; - g_return_val_if_fail (addr != NULL, -1); + g_return_val_if_fail ( addr != NULL, -1 ); /* hints = g_malloc0 ( sizeof(struct addrinfo) ); */ memset ( &hints, 0, sizeof(struct addrinfo) ); @@ -125,7 +125,7 @@ /* hints.ai_flags = AI_NUMERICHOST; */ if ( port != -1 ) - portStr = g_strdup_printf ("%d", port); + portStr = g_strdup_printf ( "%d", port ); else portStr = NULL;