mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-21 12:10:12 +01:00
compositor: fix use after free in wlsc_zoom_frame
Add the missing return statement, so the destroyed zoom object is not used. Found by Valgrind. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
35ce06d4ae
commit
2da6d5f76f
1 changed files with 3 additions and 1 deletions
|
|
@ -189,8 +189,10 @@ wlsc_zoom_frame(struct wlsc_animation *animation,
|
||||||
|
|
||||||
wlsc_spring_update(&zoom->spring, msecs);
|
wlsc_spring_update(&zoom->spring, msecs);
|
||||||
|
|
||||||
if (wlsc_spring_done(&zoom->spring))
|
if (wlsc_spring_done(&zoom->spring)) {
|
||||||
wlsc_zoom_destroy(zoom);
|
wlsc_zoom_destroy(zoom);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
scale = zoom->start +
|
scale = zoom->start +
|
||||||
(zoom->stop - zoom->start) * zoom->spring.current;
|
(zoom->stop - zoom->start) * zoom->spring.current;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue