mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 04:40:25 +01:00
util: fix a memleak printing a tablet tip event
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1165>
This commit is contained in:
parent
e77eb469e8
commit
be679889e5
1 changed files with 7 additions and 4 deletions
|
|
@ -469,10 +469,13 @@ print_tablet_tip_event(struct libinput_event *ev, const struct libinput_print_op
|
|||
char *axes = print_tablet_axes(t);
|
||||
|
||||
state = libinput_event_tablet_tool_get_tip_state(t);
|
||||
return strdup_printf("%s\t%s %s",
|
||||
time,
|
||||
axes,
|
||||
state == LIBINPUT_TABLET_TOOL_TIP_DOWN ? "down" : "up");
|
||||
char *str = strdup_printf("%s\t%s %s",
|
||||
time,
|
||||
axes,
|
||||
state == LIBINPUT_TABLET_TOOL_TIP_DOWN ? "down" : "up");
|
||||
free(axes);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue