Browse Source

Check for presence of driver name in DRIVER_COUNT_FOUND to prevent strcmp on a null pointer when a driver is not built in.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
32bc746178
  1. 2
      usbutils.c

2
usbutils.c

@ -3140,7 +3140,7 @@ void usb_cleanup() @@ -3140,7 +3140,7 @@ void usb_cleanup()
cgsem_destroy(&usb_resource_sem);
}
#define DRIVER_COUNT_FOUND(X) if (strcasecmp(ptr, X##_drv.name) == 0) { \
#define DRIVER_COUNT_FOUND(X) if (X##_drv.name && strcasecmp(ptr, X##_drv.name) == 0) { \
drv_count[X##_drv.drv_id].limit = lim; \
found = true; \
}

Loading…
Cancel
Save