mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
d/ht_crtl_emu: Free driver
This commit is contained in:
parent
1b850a1f7d
commit
a9db1a6f6e
|
@ -25,6 +25,7 @@
|
|||
#include "util/u_config_json.h"
|
||||
|
||||
#include "os/os_time.h"
|
||||
#include "xrt/xrt_device.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
@ -118,9 +119,12 @@ cemu_device_destroy(struct xrt_device *xdev)
|
|||
struct cemu_system *system = dev->sys;
|
||||
|
||||
// Remove the variable tracking.
|
||||
u_device_free(&system->out_hand[dev->hand_index]->base);
|
||||
|
||||
system->out_hand[dev->hand_index] = NULL;
|
||||
|
||||
u_device_free(&dev->base);
|
||||
if ((system->out_hand[0] == NULL) && (system->out_hand[1] == NULL)) {
|
||||
xrt_device_destroy(&system->in_hand);
|
||||
u_var_remove_root(system);
|
||||
free(system);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue