Watt-32 tcp/ip  2.2 dev-rel.10
array-bounds.c
1 #include <stdlib.h>
2 #define MAX_PROTO_ALIASES 0
3 
4 struct _protoent {
5  char *p_name;
6  char *p_aliases [MAX_PROTO_ALIASES+1];
7  int p_proto;
8  struct _protoent *p_next;
9 };
10 
11 extern struct _protoent *proto0;
12 
13 void endprotoent (void)
14 {
15  struct _protoent *p, *next;
16 
17  for (p = proto0; p; p = next)
18  {
19  int i;
20  for (i = 0; p->p_aliases[i]; i++)
21  free (p->p_aliases[i]);
22  next = p->p_next;
23  free (p->p_name);
24  free (p);
25  }
26 }
27 
28