Skip to content
Snippets Groups Projects
Commit b8f8238f authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

lua: fix some nasty memory leaks

parent 7233b7a4
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ static int
iterator_next (lua_State *L)
{
WpIterator *it = wplua_checkboxed (L, 1, WP_TYPE_ITERATOR);
GValue v = G_VALUE_INIT;
g_auto (GValue) v = G_VALUE_INIT;
if (wp_iterator_next (it, &v)) {
return wplua_gvalue_to_lua (L, &v);
} else {
......@@ -162,7 +162,7 @@ static int
metadata_iterator_next (lua_State *L)
{
WpIterator *it = wplua_checkboxed (L, 1, WP_TYPE_ITERATOR);
GValue item = G_VALUE_INIT;
g_auto (GValue) item = G_VALUE_INIT;
if (wp_iterator_next (it, &item)) {
guint32 s = 0;
const gchar *k = NULL, *t = NULL, *v = NULL;
......
......@@ -96,7 +96,7 @@ function handleEndpoint (session, ep)
end
-- if not, find a suitable target and link
target = findTarget (session, ep)
local target = findTarget (session, ep)
if target then
local ep_is_output = (ep.direction == "output")
local target_id = target['bound-id']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment