Tidy up malloc-failure handling.
diff --git a/src/network.c b/src/network.c
index b997b48..8ee9907 100644
--- a/src/network.c
+++ b/src/network.c
@@ -266,10 +266,13 @@
       iface->dad = dad;
       iface->done = 0;
       if ((iface->name = whine_malloc(strlen(ifr.ifr_name)+1)))
-	strcpy(iface->name, ifr.ifr_name);
-      iface->next = *irecp;
-      *irecp = iface;
-      return 1;
+	{
+	  strcpy(iface->name, ifr.ifr_name);
+	  iface->next = *irecp;
+	  *irecp = iface;
+	  return 1;
+	}
+      free(iface);
     }
   
   errno = ENOMEM;