[vlc-commits] dbus_screensaver: fix NULL deref if probing fails (fixes #7871)
Rémi Denis-Courmont
git at videolan.org
Sun Dec 9 13:00:53 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec 9 14:00:34 2012 +0200| [9f9f7d54fa25367f02313c91e643d04bf49a25d6] | committer: Rémi Denis-Courmont
dbus_screensaver: fix NULL deref if probing fails (fixes #7871)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9f9f7d54fa25367f02313c91e643d04bf49a25d6
---
modules/misc/inhibit/dbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/misc/inhibit/dbus.c b/modules/misc/inhibit/dbus.c
index 2c8d6d4..6f7007b 100644
--- a/modules/misc/inhibit/dbus.c
+++ b/modules/misc/inhibit/dbus.c
@@ -186,6 +186,7 @@ static int Open (vlc_object_t *obj)
sys->pending = NULL;
sys->cookie = 0;
+ ih->p_sys = sys;
for (unsigned i = 0; i < MAX_API; i++)
{
@@ -193,7 +194,6 @@ static int Open (vlc_object_t *obj)
{
msg_Dbg(ih, "found service %s", dbus_service[i]);
sys->api = i;
- ih->p_sys = sys;
ih->inhibit = Inhibit;
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list