secret-tool: Fix memory issues in lock command
There were several issues in secret_tool_action_lock()
:
-
g_autolist (GList)
isn't a correct type, as the list elements areSecretCollection
s, notGList
s - Separately from that, the list didn't take ownership of the elements either in all cases
- We were leaking the
locked
andcontext
variables
This commits just does away with all the g_auto* usage as it's the only place in the code we're using it anyway, and just does all the freeing at the end of the function.
Fixes: 015ea119 ("secret-tool: Add locking capabilities to secret tool") Fixes: #89 (closed)