[svn r231] More memory clean-ups.
1.1 --- a/gmyth/src/gmyth_monitor_handler.c Tue Dec 19 21:02:12 2006 +0000
1.2 +++ b/gmyth/src/gmyth_monitor_handler.c Tue Dec 19 21:24:01 2006 +0000
1.3 @@ -472,12 +472,6 @@
1.4 {
1.5 gboolean ret = TRUE;
1.6
1.7 - /* Creates the event socket */
1.8 - if (monitor->event_sock != NULL) {
1.9 - g_object_unref (monitor->event_sock);
1.10 - monitor->event_sock = NULL;
1.11 - }
1.12 -
1.13 monitor->event_sock = gmyth_socket_new();
1.14
1.15 /* Connects the socket, send Mythtv ANN Monitor and verify Mythtv protocol version */
2.1 --- a/gmyth/src/gmyth_query.c Tue Dec 19 21:02:12 2006 +0000
2.2 +++ b/gmyth/src/gmyth_query.c Tue Dec 19 21:24:01 2006 +0000
2.3 @@ -79,7 +79,12 @@
2.4 if (gmyth_query->backend_info) {
2.5 g_object_unref (gmyth_query->backend_info);
2.6 //gmyth_query->backend_info = NULL;
2.7 - }
2.8 + }
2.9 +
2.10 + if ( gmyth_query != NULL )
2.11 + {
2.12 + gmyth_query_disconnect (gmyth_query);
2.13 + }
2.14
2.15 G_OBJECT_CLASS (gmyth_query_parent_class)->dispose (object);
2.16 }
3.1 --- a/gmyth/src/gmyth_socket.c Tue Dec 19 21:02:12 2006 +0000
3.2 +++ b/gmyth/src/gmyth_socket.c Tue Dec 19 21:24:01 2006 +0000
3.3 @@ -307,7 +307,7 @@
3.4 {
3.5 GString *str = NULL;
3.6
3.7 - if ( local_hostname != NULL )
3.8 + if ( local_hostname != NULL && strlen(local_hostname) > 0 )
3.9 return g_string_new( local_hostname );
3.10
3.11 gchar *localaddr = NULL;
3.12 @@ -762,7 +762,7 @@
3.13 g_string_free (result, TRUE);
3.14 }
3.15
3.16 - g_string_free (hostname, FALSE);
3.17 + g_string_free (hostname, TRUE);
3.18 g_string_free (base_str, TRUE);
3.19
3.20 return TRUE;