Cleanup in InputDevice
This commit is contained in:
@@ -54,9 +54,11 @@ InputDevice::InputDevice(const char* name)
|
||||
int err = libevdev_uinput_create_from_device(device,
|
||||
LIBEVDEV_UINPUT_OPEN_MANAGED, &ui_device);
|
||||
|
||||
if(err != 0)
|
||||
if(err != 0) {
|
||||
libevdev_free(device);
|
||||
throw std::system_error(-err, std::generic_category());
|
||||
}
|
||||
}
|
||||
|
||||
InputDevice::~InputDevice()
|
||||
{
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#define LOGID_INPUTDEVICE_H
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
Reference in New Issue
Block a user