forked from TencentOS/TencentOS-kernel
Update page_owner_sort.c
Fixed a bug which may be caused stackover flow
This commit is contained in:
parent
1833d7cca0
commit
66a81ad5c1
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue