projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bzero ip_ifmatrix after allocation (4.3BSD-reno/sys/17)
[unix-history]
/
usr
/
src
/
sys
/
netinet
/
ip_input.c
diff --git
a/usr/src/sys/netinet/ip_input.c
b/usr/src/sys/netinet/ip_input.c
index
8f257fe
..
2e1e554
100644
(file)
--- a/
usr/src/sys/netinet/ip_input.c
+++ b/
usr/src/sys/netinet/ip_input.c
@@
-4,7
+4,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ip_input.c 7.
19
(Berkeley) %G%
+ * @(#)ip_input.c 7.
20
(Berkeley) %G%
*/
#include "param.h"
*/
#include "param.h"
@@
-111,8
+111,8
@@
ip_init()
ipintrq.ifq_maxlen = ipqmaxlen;
#ifdef GATEWAY
i = (if_index + 1) * (if_index + 1) * sizeof (u_long);
ipintrq.ifq_maxlen = ipqmaxlen;
#ifdef GATEWAY
i = (if_index + 1) * (if_index + 1) * sizeof (u_long);
- i
f ((ip_ifmatrix = (u_long *) malloc(i, M_RTABLE, M_WAITOK)) == 0)
-
panic("no memory for ip_ifmatrix"
);
+ i
p_ifmatrix = (u_long *) malloc(i, M_RTABLE, M_WAITOK);
+
bzero((char *)ip_ifmatrix, i
);
#endif
}
#endif
}