chiark / gitweb /
hwdb: drop useless line freeing
authorMike Frysinger <vapier@gentoo.org>
Mon, 2 Jan 2012 21:00:57 +0000 (16:00 -0500)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 2 Jan 2012 21:45:19 +0000 (22:45 +0100)
getline() takes care of extending the buffer as needed, so no point in
constantly freeing it before every call.

udev/udev-builtin-hwdb.c

index e38c6b9..b6af4b6 100644 (file)
@@ -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;