Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37d894a4 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am 660a514e: am 60097a9c: Merge "Structure device not freed in error case"

* commit '660a514e':
  Structure device not freed in error case
parents 41185c84 660a514e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -163,8 +163,10 @@ static jobject android_server_UsbHostManager_openDevice(JNIEnv *env, jobject thi
        return NULL;

    int fd = usb_device_get_fd(device);
    if (fd < 0)
    if (fd < 0) {
        usb_device_close(device);
        return NULL;
    }
    int newFD = dup(fd);
    usb_device_close(device);