Skip to content
Browse files

Fix one more case of deleting instead of reference releasing.

  • Loading branch information...
1 parent a34020b commit 0c8935498e54b1698d6e1173d37a5c370a012991 @anevilyak anevilyak committed Dec 6, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/apps/debugger/value/value_nodes/BListValueNode.cpp
View
6 src/apps/debugger/value/value_nodes/BListValueNode.cpp
@@ -246,29 +246,28 @@ BListValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
if (strcmp(member->Name(), "fObjectList") == 0) {
error = baseType->ResolveDataMemberLocation(member,
*location, memberLocation);
+ BReference<ValueLocation> locationRef(memberLocation, true);
if (error != B_OK) {
TRACE_LOCALS(
"BListValueNode::ResolvedLocationAndValue(): "
"failed to resolve location of header member: %s\n",
strerror(error));
- delete memberLocation;
return error;
}
error = valueLoader->LoadValue(memberLocation, valueType,
false, fDataLocation);
- delete memberLocation;
if (error != B_OK)
return error;
} else if (strcmp(member->Name(), "fItemCount") == 0) {
error = baseType->ResolveDataMemberLocation(member,
*location, memberLocation);
+ BReference<ValueLocation> locationRef(memberLocation, true);
if (error != B_OK) {
TRACE_LOCALS(
"BListValueNode::ResolvedLocationAndValue(): "
"failed to resolve location of header member: %s\n",
strerror(error));
- delete memberLocation;
return error;
}
@@ -280,7 +279,6 @@ BListValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
BVariant listSize;
error = valueLoader->LoadValue(memberLocation, valueType,
false, listSize);
- delete memberLocation;
if (error != B_OK)
return error;

0 comments on commit 0c89354

Please sign in to comment.
Something went wrong with that request. Please try again.