projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8e49f5
)
hwdb: drop useless line freeing
author
Mike Frysinger
<vapier@gentoo.org>
Mon, 2 Jan 2012 21:00:57 +0000
(16:00 -0500)
committer
Kay 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
patch
|
blob
|
history
diff --git
a/udev/udev-builtin-hwdb.c
b/udev/udev-builtin-hwdb.c
index
e38c6b9
..
b6af4b6
100644
(file)
--- 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;