[grilo-plugins] lua-factory: Fix crash if luaL_loadfile() fails
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] lua-factory: Fix crash if luaL_loadfile() fails
- Date: Fri, 6 Mar 2015 18:49:45 +0000 (UTC)
commit 85a684b6d2bb9baeaff14220ed0b3a1a12a7ab32
Author: Bastien Nocera <hadess hadess net>
Date: Fri Mar 6 19:38:52 2015 +0100
lua-factory: Fix crash if luaL_loadfile() fails
And there's a resource associated to the script. We'd be trying to
unref the GResource with the wrong function.
src/lua-factory/grl-lua-factory.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-factory.c b/src/lua-factory/grl-lua-factory.c
index cfa950e..a0629f4 100644
--- a/src/lua-factory/grl-lua-factory.c
+++ b/src/lua-factory/grl-lua-factory.c
@@ -328,7 +328,7 @@ bail:
g_list_free (source->priv->slow_keys);
}
- g_clear_object (&resource);
+ g_clear_pointer (&resource, g_resource_unref);
g_free (source_id);
lua_close (L);
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]