[db] free_query_params should also free qp->group

Plus honor qp->order in queue_enum_start() if set by caller
This commit is contained in:
ejurgensen 2024-09-10 22:39:23 +02:00
parent 4c5a7fb936
commit e32e7f392c
1 changed files with 4 additions and 1 deletions

View File

@ -844,6 +844,7 @@ free_query_params(struct query_params *qp, int content_only)
free(qp->filter);
free(qp->having);
free(qp->order);
free(qp->group);
if (!content_only)
free(qp);
@ -5291,7 +5292,9 @@ queue_enum_start(struct query_params *qp)
qp->stmt = NULL;
if (qp->sort)
if (qp->order)
orderby = qp->order;
else if (qp->sort)
orderby = sort_clause[qp->sort];
else
orderby = sort_clause[S_POS];