am 60097a9c: Merge "Structure device not freed in error case"
* commit '60097a9c5a7214cb73d0bc966adef767743f8798': Structure device not freed in error case
This commit is contained in:
@@ -163,8 +163,10 @@ static jobject android_server_UsbHostManager_openDevice(JNIEnv *env, jobject thi
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
int fd = usb_device_get_fd(device);
|
int fd = usb_device_get_fd(device);
|
||||||
if (fd < 0)
|
if (fd < 0) {
|
||||||
|
usb_device_close(device);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
int newFD = dup(fd);
|
int newFD = dup(fd);
|
||||||
usb_device_close(device);
|
usb_device_close(device);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user