diff --git a/src/nm-policy-hostname.c b/src/nm-policy-hostname.c index a788c8bc99..0ea161585f 100644 --- a/src/nm-policy-hostname.c +++ b/src/nm-policy-hostname.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2011 Red Hat, Inc. + * Copyright (C) 2004 - 2012 Red Hat, Inc. * Copyright (C) 2007 - 2008 Novell, Inc. */ @@ -139,7 +139,6 @@ hostname4_thread_new (guint32 ip4_addr, gpointer user_data) { HostnameThread *ht; - struct sockaddr_in addr4; char buf[INET_ADDRSTRLEN + 1]; ht = g_malloc0 (sizeof (HostnameThread)); @@ -160,7 +159,7 @@ hostname4_thread_new (guint32 ip4_addr, return NULL; } - if (!inet_ntop (AF_INET, &addr4.sin_addr, buf, sizeof (buf))) + if (!inet_ntop (AF_INET, &ht->addr4.sin_addr, buf, sizeof (buf))) strcpy (buf, "(unknown)"); nm_log_dbg (LOGD_DNS, "(%p) started IPv4 reverse-lookup thread for address '%s'",