summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hid.c b/hid.c
index 99870ad..91c22cd 100644
--- a/hid.c
+++ b/hid.c
@@ -111,9 +111,10 @@ static void parse_device(struct hid_entries *entries, const char *dev)
device_name = strdup("HID Device");
modname = modalias_resolve_module(modalias);
- DEBUG("%s: module name is [%s]\n", HID_BUS_NAME, modname);
- add_entry(entries, device_name, modname);
free(modalias);
+ DEBUG("%s: module name is [%s]\n", HID_BUS_NAME, modname);
+ if (modname != NULL)
+ add_entry(entries, device_name, modname);
}