Browse files

+ Eliminate memory leak

  • Loading branch information...
1 parent 48ce32b commit 57c53f9726119d9add5e231a3fab0e79dc46239d @neoxic neoxic committed Feb 29, 2012
Showing with 0 additions and 4 deletions.
  1. +0 −4 mongo_dbclient.cpp
View
4 mongo_dbclient.cpp
@@ -300,8 +300,6 @@ static int dbclient_query(lua_State *L) {
const BSONObj *fieldsToReturn = NULL;
if (!lua_isnoneornil(L, 6)) {
- fieldsToReturn = new BSONObj();
-
int type = lua_type(L, 6);
if (type == LUA_TSTRING) {
@@ -367,8 +365,6 @@ static int dbclient_find_one(lua_State *L) {
const BSONObj *fieldsToReturn = NULL;
if (!lua_isnoneornil(L, 4)) {
- fieldsToReturn = new BSONObj();
-
int type = lua_type(L, 4);
if (type == LUA_TSTRING) {

0 comments on commit 57c53f9

Please sign in to comment.