Browse Source

Bugfix: bifury: Avoid double-free and double-close on version parse errors during probe

Luke Dashjr 12 years ago
parent
commit
a781e4b757
1 changed files with 2 additions and 0 deletions
  1. 2 0
      driver-bifury.c

+ 2 - 0
driver-bifury.c

@@ -166,6 +166,8 @@ bool bifury_detect_one(const char * const devpath)
 
 parseerr:
 	applog(LOG_DEBUG, "%s: Error parsing version response", bifury_drv.dname);
+	return false;
+
 err:
 	bytes_free(&reply);
 	serial_close(fd);