From: Mike Frysinger Date: Mon, 2 Jan 2012 21:00:57 +0000 (-0500) Subject: hwdb: drop useless line freeing X-Git-Tag: 176~20 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d876eea1c48384f66f18e28803187def44c481be;p=systemd hwdb: drop useless line freeing getline() takes care of extending the buffer as needed, so no point in constantly freeing it before every call. --- diff --git a/udev/udev-builtin-hwdb.c b/udev/udev-builtin-hwdb.c index e38c6b9d..b6af4b6f 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;