Skip to content

Commit

Permalink
fix core dump
Browse files Browse the repository at this point in the history
  • Loading branch information
ingenthr authored and steveyen committed May 19, 2009
1 parent 56a5060 commit 8977cae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cproxy.c
Expand Up @@ -749,8 +749,12 @@ void cproxy_free_downstream(downstream *d) {

int n = memcached_server_count(&d->mst);

for (int i = 0; i < n; i++)
d->downstream_conns[i]->extra = NULL;
if (d->downstream_conns != NULL) {
for (int i = 0; i < n; i++) {
if (d->downstream_conns[i] != NULL)
d->downstream_conns[i]->extra = NULL;
}
}

// This will close sockets, which will force associated conn's
// to go to conn_closing state. Since we've already cleared
Expand Down

0 comments on commit 8977cae

Please sign in to comment.