]> err.no Git - systemd/commitdiff
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 e38c6b9d268c3afd5767873430d708cff4bb00b4..b6af4b6fcf3ee3436db8a3cf45cfba5878ef5f80 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;