summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c44f15b)
Thanks to Ralf (johann @ fhem-forum) for reporting and fixing this
devh = hmcfgusb_find(ID_VENDOR, ID_PRODUCT_BL);
if (!devh) {
fprintf(stderr, "Can't find/open hmcfgusb!\n");
devh = hmcfgusb_find(ID_VENDOR, ID_PRODUCT_BL);
if (!devh) {
fprintf(stderr, "Can't find/open hmcfgusb!\n");
return NULL;
}
bootloader = 1;
return NULL;
}
bootloader = 1;
dev = malloc(sizeof(struct hmcfgusb_dev));
if (!dev) {
perror("Can't allocate memory for hmcfgusb_dev");
dev = malloc(sizeof(struct hmcfgusb_dev));
if (!dev) {
perror("Can't allocate memory for hmcfgusb_dev");
+ libusb_close(devh);
+ libusb_exit(NULL);
if (!cb_data) {
perror("Can't allocate memory for hmcfgusb_cb_data");
free(dev);
if (!cb_data) {
perror("Can't allocate memory for hmcfgusb_cb_data");
free(dev);
+ libusb_close(devh);
+ libusb_exit(NULL);
fprintf(stderr, "Can't prepare async device io!\n");
free(dev);
free(cb_data);
fprintf(stderr, "Can't prepare async device io!\n");
free(dev);
free(cb_data);
+ libusb_close(devh);
+ libusb_exit(NULL);
fprintf(stderr, "Can't get FDset from libusb!\n");
free(dev);
free(cb_data);
fprintf(stderr, "Can't get FDset from libusb!\n");
free(dev);
free(cb_data);
+ libusb_close(devh);
+ libusb_exit(NULL);
perror("Can't allocate memory for poll-fds");
free(dev);
free(cb_data);
perror("Can't allocate memory for poll-fds");
free(dev);
free(cb_data);
+ libusb_close(devh);
+ libusb_exit(NULL);