Skip to content

Commit

Permalink
fix(linux.usb): memory leak on non-usb udev events (eclipse-kura#5130)
Browse files Browse the repository at this point in the history
* fix(linux.usb): memory leak on non-usb udev events

Signed-off-by: Marcello Martina <[email protected]>

* build: added compiled libraries

Signed-off-by: Marcello Martina <[email protected]>

---------

Signed-off-by: Marcello Martina <[email protected]>
  • Loading branch information
marcellorinaldo authored Feb 19, 2024
1 parent 538fddc commit 5d3cfc1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions kura/org.eclipse.kura.linux.usb/src/main/c/udev/LinuxUdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,14 @@ JNIEXPORT void JNICALL Java_org_eclipse_kura_linux_usb_LinuxUdevNative_nativeHot
(*env)->CallVoidMethod(env, linuxUdevNative, LinuxUdevNativeCallback, eventType, UsbDeviceObject);
}
}
udev_device_unref(dev);
}
}
else {
udev_device_unref(dev);
} else {
printf("No Device from receive_device(). An error occured.\n");
}
}
usleep(250*1000);
}

udev_unref(udev);
}

0 comments on commit 5d3cfc1

Please sign in to comment.