mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 05:05:12 +02:00
xt_ACCOUNT: call free_pages(x,2)
Below is the patch with the *rest* of the free_page(X) calls changed to free_pages(X, 2). xt_ACCOUNT should always allocate memory in page pairs. And always *free* memory in page pairs. References: http://www.spinics.net/lists/netfilter-devel/msg39025.html
This commit is contained in:

committed by
Jan Engelhardt

parent
a9358542fe
commit
f89f10bbe9
@@ -141,7 +141,7 @@ static void ipt_acc_data_free(void *data, uint8_t depth)
|
||||
unsigned int b;
|
||||
for (b = 0; b <= 255; b++) {
|
||||
if (mask_16->mask_24[b]) {
|
||||
free_page((unsigned long)mask_16->mask_24[b]);
|
||||
free_pages((unsigned long)mask_16->mask_24[b], 2);
|
||||
}
|
||||
}
|
||||
free_pages((unsigned long)data, 2);
|
||||
@@ -158,10 +158,10 @@ static void ipt_acc_data_free(void *data, uint8_t depth)
|
||||
|
||||
for (b = 0; b <= 255; b++) {
|
||||
if (mask_16->mask_24[b]) {
|
||||
free_page((unsigned long)mask_16->mask_24[b]);
|
||||
free_pages((unsigned long)mask_16->mask_24[b], 2);
|
||||
}
|
||||
}
|
||||
free_page((unsigned long)mask_16);
|
||||
free_pages((unsigned long)mask_16, 2);
|
||||
}
|
||||
}
|
||||
free_pages((unsigned long)data, 2);
|
||||
|
Reference in New Issue
Block a user