summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 26868df)
raw | patch | inline | side by side (parent: 26868df)
author | Saikrishna Arcot <saiarcot895@gmail.com> | |
Wed, 31 May 2017 14:49:25 +0000 (07:49 -0700) | ||
committer | Saikrishna Arcot <saiarcot895@gmail.com> | |
Wed, 31 May 2017 14:49:25 +0000 (07:49 -0700) |
src/write_mongodb.c | patch | blob | history |
diff --git a/src/write_mongodb.c b/src/write_mongodb.c
index 3cdc3d1db873847924493a57b0357650bcaa7610..33f9bd50011e9be6c5941c26d26c1a556113d04f 100644 (file)
--- a/src/write_mongodb.c
+++ b/src/write_mongodb.c
rates = uc_get_rate(ds, vl);
if (rates == NULL) {
ERROR("write_mongodb plugin: uc_get_rate() failed.");
- bson_free(ret);
+ bson_destroy(ret);
return NULL;
}
} else {
else {
ERROR("write_mongodb plugin: Unknown ds_type %d for index %d",
ds->ds[i].type, i);
- bson_free(ret);
+ bson_destroy(ret);
return NULL;
}
}
if (!bson_validate(ret, BSON_VALIDATE_UTF8, &error_location)) {
ERROR("write_mongodb plugin: Error in generated BSON document "
"at byte %zu", error_location);
- bson_free(ret);
+ bson_destroy(ret);
return NULL;
}
if (wm_initialize(node) < 0) {
ERROR("write_mongodb plugin: error making connection to server");
pthread_mutex_unlock(&node->lock);
- bson_free(bson_record);
+ bson_destroy(bson_record);
return -1;
}
node->client = NULL;
node->connected = 0;
pthread_mutex_unlock(&node->lock);
- bson_free(bson_record);
+ bson_destroy(bson_record);
return -1;
}
node->client = NULL;
node->connected = 0;
pthread_mutex_unlock(&node->lock);
- bson_free(bson_record);
+ bson_destroy(bson_record);
mongoc_collection_destroy(collection);
return -1;
}
pthread_mutex_unlock(&node->lock);
- bson_free(bson_record);
+ bson_destroy(bson_record);
return 0;
} /* }}} int wm_write */