Update page_owner_sort.c

Fixed a bug which may be caused stackover flow
This commit is contained in:
David Lin 2020-03-15 22:24:58 +08:00 committed by GitHub
parent 1833d7cca0
commit 66a81ad5c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -129,6 +129,10 @@ int main(int argc, char **argv)
qsort(list, list_size, sizeof(list[0]), compare_txt);
list2 = malloc(sizeof(*list) * list_size);
if (!list2) {
printf("Out of memory\n");
exit(1);
}
printf("culling\n");