fix sm leak b/c of iterator api confusion - part of SERVER-73

This commit is contained in:
Eliot Horowitz
2009-05-28 15:08:03 -04:00
parent 086330fdea
commit 7f6c3e9ebe

View File

@@ -486,13 +486,15 @@ namespace mongo {
assert( JS_ValueToId( cx , c.toval( name.c_str() ) , idp ) );
}
else {
delete it;
*statep = 0;
}
return JS_TRUE;
}
if ( enum_op == JSENUMERATE_DESTROY ){
delete it;
if ( it )
delete it;
return JS_TRUE;
}