[svn r668] Fixed but to release hostname string when the local machine does not have hostname set trunk
authormelunko
Wed May 16 13:21:24 2007 +0100 (2007-05-16)
branchtrunk
changeset 6629d602fc9a799
parent 661 a4fb2dd520ba
child 663 338476853df3
[svn r668] Fixed but to release hostname string when the local machine does not have hostname set
gmyth/src/gmyth_livetv.c
     1.1 --- a/gmyth/src/gmyth_livetv.c	Wed May 16 00:16:07 2007 +0100
     1.2 +++ b/gmyth/src/gmyth_livetv.c	Wed May 16 13:21:24 2007 +0100
     1.3 @@ -434,8 +434,11 @@
     1.4  
     1.5      if (livetv->local_hostname == NULL)
     1.6      {
     1.7 +        g_warning ("livetv could not retrieve the local hostname");
     1.8          res = FALSE;
     1.9          goto error;
    1.10 +    } else {
    1.11 +        gmyth_debug ("Local hostname: %s", livetv->local_hostname->str);
    1.12      }
    1.13  
    1.14      if (livetv->recorder != NULL)
    1.15 @@ -649,7 +652,8 @@
    1.16  
    1.17      res = FALSE;
    1.18  
    1.19 -    g_string_free (livetv->local_hostname, TRUE);
    1.20 +    if (livetv->local_hostname != NULL)
    1.21 +        g_string_free (livetv->local_hostname, TRUE);
    1.22  
    1.23      if (livetv->recorder != NULL)
    1.24      {