From: Martin Mareš Date: Mon, 8 Jun 2026 12:04:32 +0000 (+0200) Subject: names-hwdb: Do now crash when hwdb.bin is not available X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;p=thirdparty%2Fpciutils.git names-hwdb: Do now crash when hwdb.bin is not available --- diff --git a/lib/names-hwdb.c b/lib/names-hwdb.c index b1f6052..e08b0c5 100644 --- a/lib/names-hwdb.c +++ b/lib/names-hwdb.c @@ -71,7 +71,11 @@ pci_id_hwdb_lookup(struct pci_access *a, int cat, int id1, int id2, int id3, int { a->debug("Initializing UDEV HWDB\n"); a->id_udev = udev_new(); + if (!a->id_udev) + return NULL; a->id_udev_hwdb = udev_hwdb_new(a->id_udev); + if (!a->id_udev_hwdb) + return NULL; } struct udev_list_entry *entry;