Commit 93731baf authored by Olivier Crête's avatar Olivier Crête

agent: Free every parameter

Fixes off-by-one error
parent b09462c7
......@@ -176,10 +176,12 @@ free_queued_signal (QueuedSignal *sig)
{
guint i;
g_value_unset (&sig->params[0]);
for (i = 0; i < sig->query.n_params; i++) {
g_free (g_value_get_pointer (&sig->params[i]));
g_value_unset (&sig->params[i]);
if (G_VALUE_HOLDS(&sig->params[i + 1], NICE_TYPE_AGENT_STREAM_IDS))
g_free (g_value_get_pointer (&sig->params[i + 1]));
g_value_unset (&sig->params[i + 1]);
}
g_slice_free1 (sizeof(GValue) * (sig->query.n_params + 1), sig->params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment