projects
/
profile
/
ivi
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35ce06d
)
compositor: fix use after free in wlsc_zoom_frame
author
Pekka Paalanen
<ppaalanen@gmail.com>
Tue, 3 Jan 2012 11:27:41 +0000
(13:27 +0200)
committer
Pekka Paalanen
<ppaalanen@gmail.com>
Tue, 3 Jan 2012 14:16:28 +0000
(16:16 +0200)
Add the missing return statement, so the destroyed zoom object is not
used.
Found by Valgrind.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
compositor/util.c
patch
|
blob
|
history
diff --git
a/compositor/util.c
b/compositor/util.c
index
4ce1774
..
6d6c0c9
100644
(file)
--- a/
compositor/util.c
+++ b/
compositor/util.c
@@
-189,8
+189,10
@@
wlsc_zoom_frame(struct wlsc_animation *animation,
wlsc_spring_update(&zoom->spring, msecs);
- if (wlsc_spring_done(&zoom->spring))
+ if (wlsc_spring_done(&zoom->spring))
{
wlsc_zoom_destroy(zoom);
+ return;
+ }
scale = zoom->start +
(zoom->stop - zoom->start) * zoom->spring.current;