Page MenuHomeFreeBSD

D35385.diff
No OneTemporary

D35385.diff

diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -2722,7 +2722,7 @@
if (nv->len > pf_ioctl_maxcount)
ERROUT(ENOMEM);
- nvlpacked = malloc(nv->len, M_TEMP, M_WAITOK);
+ nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK);
if (nvlpacked == NULL)
ERROUT(ENOMEM);
@@ -2763,7 +2763,7 @@
nvlist_destroy(nvl);
nvl = NULL;
- free(nvlpacked, M_TEMP);
+ free(nvlpacked, M_NVLIST);
nvlpacked = NULL;
rule = TAILQ_FIRST(rs->active.rules);
@@ -2803,7 +2803,7 @@
#undef ERROUT
DIOCGETETHRULE_error:
- free(nvlpacked, M_TEMP);
+ free(nvlpacked, M_NVLIST);
nvlist_destroy(nvl);
break;
}
@@ -2819,7 +2819,7 @@
#define ERROUT(x) ERROUT_IOCTL(DIOCADDETHRULE_error, x)
- nvlpacked = malloc(nv->len, M_TEMP, M_WAITOK);
+ nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK);
if (nvlpacked == NULL)
ERROUT(ENOMEM);
@@ -2922,7 +2922,7 @@
#undef ERROUT
DIOCADDETHRULE_error:
nvlist_destroy(nvl);
- free(nvlpacked, M_TEMP);
+ free(nvlpacked, M_NVLIST);
break;
}
@@ -3117,7 +3117,7 @@
if (nv->len > pf_ioctl_maxcount)
ERROUT(ENOMEM);
- nvlpacked = malloc(nv->len, M_TEMP, M_WAITOK);
+ nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK);
error = copyin(nv->data, nvlpacked, nv->len);
if (error)
ERROUT(error);
@@ -3156,13 +3156,13 @@
anchor_call, td);
nvlist_destroy(nvl);
- free(nvlpacked, M_TEMP);
+ free(nvlpacked, M_NVLIST);
break;
#undef ERROUT
DIOCADDRULENV_error:
pf_krule_free(rule);
nvlist_destroy(nvl);
- free(nvlpacked, M_TEMP);
+ free(nvlpacked, M_NVLIST);
break;
}
@@ -6018,7 +6018,7 @@
if (nv->len > pf_ioctl_maxcount)
ERROUT(ENOMEM);
- nvlpacked = malloc(nv->len, M_TEMP, M_WAITOK);
+ nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK);
if (nvlpacked == NULL)
ERROUT(ENOMEM);
@@ -6037,7 +6037,7 @@
on_error:
nvlist_destroy(nvl);
- free(nvlpacked, M_TEMP);
+ free(nvlpacked, M_NVLIST);
return (error);
}
diff --git a/sys/netpfil/pf/pf_syncookies.c b/sys/netpfil/pf/pf_syncookies.c
--- a/sys/netpfil/pf/pf_syncookies.c
+++ b/sys/netpfil/pf/pf_syncookies.c
@@ -171,7 +171,7 @@
#undef ERROUT
errout:
nvlist_destroy(nvl);
- free(nvlpacked, M_TEMP);
+ free(nvlpacked, M_NVLIST);
return (error);
}
@@ -191,7 +191,7 @@
if (nv->len > pf_ioctl_maxcount)
return (ENOMEM);
- nvlpacked = malloc(nv->len, M_TEMP, M_WAITOK);
+ nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK);
if (nvlpacked == NULL)
return (ENOMEM);
@@ -232,7 +232,7 @@
#undef ERROUT
errout:
nvlist_destroy(nvl);
- free(nvlpacked, M_TEMP);
+ free(nvlpacked, M_NVLIST);
return (error);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 4:46 AM (11 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15611260
Default Alt Text
D35385.diff (2 KB)

Event Timeline