mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-11-23 23:10:57 +07:00
Do not free a static string
In file included from udevadm-hwdb.c:26: In function ‘freep’, inlined from ‘adm_hwdb’ at udevadm-hwdb.c:624:38: ../../src/shared/util.h:289:9: warning: ‘free’ called on a pointer to an unallocated object ‘"/usr/etc/udev/hwdb.bin"’ [-Wfree-nonheap-object] 289 | free(*(void**) p); | ^~~~~~~~~~~~~~~~~ ../../src/shared/util.h:289:9: warning: ‘free’ called on a pointer to an unallocated object ‘"/usr/etc/udev/hwdb.bin"’ [-Wfree-nonheap-object]
This commit is contained in:
parent
ba2cff9c54
commit
e4bbbc8e36
@ -621,7 +621,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
|
||||
|
||||
if (update) {
|
||||
char **files, **f;
|
||||
_cleanup_free_ char *hwdb_bin = UDEV_HWDB_BIN;
|
||||
char *hwdb_bin = UDEV_HWDB_BIN;
|
||||
|
||||
trie = new0(struct trie, 1);
|
||||
if (!trie) {
|
||||
|
Loading…
Reference in New Issue
Block a user