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

Commit 60097a9c authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Gerrit Code Review
Browse files

Merge "Structure device not freed in error case"

parents 02a64dae 9bd36ef2
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);