[dialog-search] another QofQuery "q" must be destroyed

because qof_query_merge creates a newly allocated QofQuery, its 2
QofQuery must be freed separately.
This commit is contained in:
Christopher Lam 2021-11-19 00:02:48 +08:00
parent 74d594d181
commit 27683f212d

View File

@ -478,8 +478,10 @@ search_update_query (GNCSearchWindow *sw)
if (pdata)
{
q2 = create_query_fragment(sw->search_for, GNC_SEARCH_PARAM (data->param), pdata);
q = qof_query_merge (q, q2, op);
new_q = qof_query_merge (q, q2, op);
qof_query_destroy (q);
qof_query_destroy (q2);
q = new_q;
}
}