Skip to content

Commit ca8373a

Browse files
authored
Fix "Use after free" (#559)
Fixes: #542
1 parent 435650a commit ca8373a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

linux/hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path)
10071007
res = ioctl(dev->device_handle, HIDIOCGRDESCSIZE, &desc_size);
10081008
if (res < 0) {
10091009
hid_close(dev);
1010-
register_device_error_format(dev, "ioctl(GRDESCSIZE) error for '%s', not a HIDRAW device?: %s", path, strerror(errno));
1010+
register_global_error_format("ioctl(GRDESCSIZE) error for '%s', not a HIDRAW device?: %s", path, strerror(errno));
10111011
return NULL;
10121012
}
10131013

0 commit comments

Comments
 (0)