[PATCH] hwdb: drop useless line freeing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



getline() takes care of extending the buffer as needed, so no point in
constantly freeing it before every call.

Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
---
 udev/udev-builtin-hwdb.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/udev/udev-builtin-hwdb.c b/udev/udev-builtin-hwdb.c
index e38c6b9..b6af4b6 100644
--- a/udev/udev-builtin-hwdb.c
+++ b/udev/udev-builtin-hwdb.c
@@ -101,11 +101,6 @@ static int lookup_vid_pid(const char *database,
 	for (;;) {
 		size_t n;
 
-		if (line) {
-			free(line);
-			line = NULL;
-		}
-
 		if (getline(&line, &n, f) < 0)
 			break;
 
-- 
1.7.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux