Fix memory corruption if >2 ports

pull/154/head
Craig Tiller 10 years ago
parent 9f44bfff6d
commit 93da6ac647
  1. 2
      src/core/iomgr/tcp_server_posix.c

@ -252,7 +252,7 @@ static int add_socket_to_server(grpc_tcp_server *s, int fd,
if (s->nports == s->port_capacity) {
s->port_capacity *= 2;
s->ports =
gpr_realloc(s->ports, sizeof(server_port *) * s->port_capacity);
gpr_realloc(s->ports, sizeof(server_port) * s->port_capacity);
}
sp = &s->ports[s->nports++];
sp->server = s;

Loading…
Cancel
Save