[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:
parent
4c5a7fb936
commit
e32e7f392c
5
src/db.c
5
src/db.c
|
@ -844,6 +844,7 @@ free_query_params(struct query_params *qp, int content_only)
|
||||||
free(qp->filter);
|
free(qp->filter);
|
||||||
free(qp->having);
|
free(qp->having);
|
||||||
free(qp->order);
|
free(qp->order);
|
||||||
|
free(qp->group);
|
||||||
|
|
||||||
if (!content_only)
|
if (!content_only)
|
||||||
free(qp);
|
free(qp);
|
||||||
|
@ -5291,7 +5292,9 @@ queue_enum_start(struct query_params *qp)
|
||||||
|
|
||||||
qp->stmt = NULL;
|
qp->stmt = NULL;
|
||||||
|
|
||||||
if (qp->sort)
|
if (qp->order)
|
||||||
|
orderby = qp->order;
|
||||||
|
else if (qp->sort)
|
||||||
orderby = sort_clause[qp->sort];
|
orderby = sort_clause[qp->sort];
|
||||||
else
|
else
|
||||||
orderby = sort_clause[S_POS];
|
orderby = sort_clause[S_POS];
|
||||||
|
|
Loading…
Reference in New Issue