Browse files

bug fix: conn->primary was not allocated

  • Loading branch information...
1 parent 6c361a4 commit dcc2bff21c056533ab9229dc58fd20e3672f4de4 @gerald-lindsly gerald-lindsly committed Dec 29, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/mongo.c
View
1 src/mongo.c
@@ -644,6 +644,7 @@ MONGO_EXPORT int mongo_replica_set_client( mongo *conn ) {
/* Primary found, so return. */
else if( conn->replica_set->primary_connected ) {
+ conn->primary = bson_malloc( sizeof( mongo_host_port ) );
strncpy( conn->primary->host, node->host, strlen( node->host ) + 1 );
conn->primary->port = node->port;
return MONGO_OK;

0 comments on commit dcc2bff

Please sign in to comment.