input/control: INPUT_CHANGE_BOOKMARK: fix leak and return
commitdb9941a7a89a9e2c5356c956c0ba3079080e66fe
authorFilip Roséen <filip@atch.se>
Fri, 19 May 2017 07:30:36 +0000 (19 09:30 +0200)
committerThomas Guillem <thomas@gllm.fr>
Fri, 19 May 2017 07:39:32 +0000 (19 09:39 +0200)
treea76e27cc96189d8445bcbb78a02710ea1519e807
parent8a5ef6541fcf42734778b99b1bb8bd9ff2f9d3ab
input/control: INPUT_CHANGE_BOOKMARK: fix leak and return

The previous implementation would potentially try to duplicate a
seekpoint that was never used due to invalid arguments, as well as
leaking said duplicate.

These changes make sure that we do not leak the resource, while also
preventing the unnecessary duplication + returning an error if
we are unable to complete the operation.

CID: 1409711

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
src/input/control.c