Fixed db memory bug in sort.c