diff options
author | Bastien Nocera <hadess@hadess.net> | 2015-03-06 19:39:36 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2015-03-06 19:39:36 +0100 |
commit | ff3b2adc4b33b9b083862b431995cd9a418c534c (patch) | |
tree | 10e18ec0121f105294e31efe7f784175455dc46e /src | |
parent | 85a684b6d2bb9baeaff14220ed0b3a1a12a7ab32 (diff) | |
download | grilo-plugins-ff3b2adc4b33b9b083862b431995cd9a418c534c.tar.gz |
lua-factory: Fix double-free when lua script fails to init
If we fail to initialise the script after having associated the resource
with the source object, we might try to free that resource both when the
source got disposed, and in the error path.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua-factory/grl-lua-factory.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lua-factory/grl-lua-factory.c b/src/lua-factory/grl-lua-factory.c index a0629f4..ad1532e 100644 --- a/src/lua-factory/grl-lua-factory.c +++ b/src/lua-factory/grl-lua-factory.c @@ -286,6 +286,7 @@ grl_lua_factory_source_new (gchar *lua_plugin_path, g_clear_object (&source_icon); g_object_set_data_full (G_OBJECT (source), "resources", resource, (GDestroyNotify) g_resource_unref); + resource = NULL; ret = lua_plugin_source_operations (L, source->priv->fn); if (ret != LUA_OK) |