summaryrefslogtreecommitdiffstats
path: root/src/nolo.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-09-22 23:59:15 +0200
committerPali Rohár <pali.rohar@gmail.com>2012-09-22 23:59:15 +0200
commit15b05dce75b8a2195e5ba613e157fd308bc9f03f (patch)
tree9a18f0b9bceedf35255ca1710f810316e3c27b07 /src/nolo.c
parente4b4d211c1ffd199f49e94cd799157f1c825dbf1 (diff)
download0xFFFF-15b05dce75b8a2195e5ba613e157fd308bc9f03f.tar.bz2
nolo: Fix nolo_send_image
Diffstat (limited to 'src/nolo.c')
-rw-r--r--src/nolo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nolo.c b/src/nolo.c
index 713ae6e..6ac0233 100644
--- a/src/nolo.c
+++ b/src/nolo.c
@@ -240,12 +240,14 @@ static int nolo_send_image(struct usb_device_info * dev, struct image * image, i
int i;
uint8_t len;
char buf[9];
- char ** bufs;
+ char ** bufs = NULL;
struct device_list * device = image->devices;
- while ( device )
+ while ( device ) {
if ( device->device == dev->detected_device && hwrev_is_valid(device->hwrevs, dev->detected_hwrev) )
break;
+ device = device->next;
+ }
if ( device )
bufs = device_list_alloc_to_bufs(device);