From 6ccf2d2376e4472d9210d75cf3a0634fd785bb65 Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Thu, 8 Nov 2007 23:51:47 +0000 Subject: [PATCH] fix uninitialised memory usage in pci_add pci_add was using vendor_name, product_name, subsys_vendor_name and subsys_product_name unitialised, causing random crashes and garbage output. --- hald/linux/device.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hald/linux/device.c b/hald/linux/device.c index 8cc12ef..dc955c6 100644 --- a/hald/linux/device.c +++ b/hald/linux/device.c @@ -1548,10 +1548,10 @@ pci_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de { gchar buf[64]; - char *vendor_name; - char *product_name; - char *subsys_vendor_name; - char *subsys_product_name; + char *vendor_name = NULL; + char *product_name = NULL; + char *subsys_vendor_name = NULL; + char *subsys_product_name = NULL; ids_find_pci (hal_device_property_get_int (d, "pci.vendor_id"), hal_device_property_get_int (d, "pci.product_id"), -- 1.5.3.7