Fix leaks and warnings reported by valgrind.
diff --git a/ip/ip.c b/ip/ip.c
index b6ff2df..f57651e 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -122,6 +122,8 @@
 				break;
 		}
 	}
+	if (line)
+		free(line);
 
 	rtnl_close(&rth);
 	return ret;