Changeset 787

Show
Ignore:
Timestamp:
06/23/08 04:05:23 (2 months ago)
Author:
dormando
Message:

Allocate new conn structures with calloc.

Janusz Dziemidowicz reported conn->next was sometimes not initialized.
This would have been the case for any client connection, or any
listener connection that wasn't tcp.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/server/memcached.c

    r786 r787  
    298298 
    299299    if (NULL == c) { 
    300         if (!(c = (conn *)malloc(sizeof(conn)))) { 
    301             fprintf(stderr, "malloc()\n"); 
     300        if (!(c = (conn *)calloc(1, sizeof(conn)))) { 
     301            fprintf(stderr, "calloc()\n"); 
    302302            return NULL; 
    303303        }