chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
23b7245
)
libudev: hwdb - cleanup list before getting new properties
author
Kay Sievers
<kay@vrfy.org>
Sun, 28 Oct 2012 03:59:38 +0000
(
04:59
+0100)
committer
Kay Sievers
<kay@vrfy.org>
Sun, 28 Oct 2012 03:59:38 +0000
(
04:59
+0100)
src/libudev/libudev-hwdb.c
patch
|
blob
|
history
diff --git
a/src/libudev/libudev-hwdb.c
b/src/libudev/libudev-hwdb.c
index a3f815f83f7d32455cf0d9e1e3d12ba402546b82..8fe24a432001b7d2ed91d1120c27de867dbe0aee 100644
(file)
--- a/
src/libudev/libudev-hwdb.c
+++ b/
src/libudev/libudev-hwdb.c
@@
-338,10
+338,10
@@
_public_ struct udev_hwdb *udev_hwdb_unref(struct udev_hwdb *hwdb) {
hwdb->refcount--;
if (hwdb->refcount > 0)
return hwdb;
- if (hwdb->f)
- fclose(hwdb->f);
if (hwdb->map)
munmap((void *)hwdb->map, hwdb->st.st_size);
+ if (hwdb->f)
+ fclose(hwdb->f);
udev_list_cleanup(&hwdb->properties_list);
free(hwdb);
return NULL;
@@
-382,6
+382,7
@@
_public_ struct udev_list_entry *udev_hwdb_get_properties_list_entry(struct udev
return NULL;
}
+ udev_list_cleanup(&hwdb->properties_list);
err = trie_search_f(hwdb, modalias);
if (err < 0) {
errno = -err;