Fix one more case of deleting instead of reference releasing.
This commit is contained in:
@@ -246,29 +246,28 @@ BListValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
|
|||||||
if (strcmp(member->Name(), "fObjectList") == 0) {
|
if (strcmp(member->Name(), "fObjectList") == 0) {
|
||||||
error = baseType->ResolveDataMemberLocation(member,
|
error = baseType->ResolveDataMemberLocation(member,
|
||||||
*location, memberLocation);
|
*location, memberLocation);
|
||||||
|
BReference<ValueLocation> locationRef(memberLocation, true);
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
TRACE_LOCALS(
|
TRACE_LOCALS(
|
||||||
"BListValueNode::ResolvedLocationAndValue(): "
|
"BListValueNode::ResolvedLocationAndValue(): "
|
||||||
"failed to resolve location of header member: %s\n",
|
"failed to resolve location of header member: %s\n",
|
||||||
strerror(error));
|
strerror(error));
|
||||||
delete memberLocation;
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
error = valueLoader->LoadValue(memberLocation, valueType,
|
error = valueLoader->LoadValue(memberLocation, valueType,
|
||||||
false, fDataLocation);
|
false, fDataLocation);
|
||||||
delete memberLocation;
|
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
} else if (strcmp(member->Name(), "fItemCount") == 0) {
|
} else if (strcmp(member->Name(), "fItemCount") == 0) {
|
||||||
error = baseType->ResolveDataMemberLocation(member,
|
error = baseType->ResolveDataMemberLocation(member,
|
||||||
*location, memberLocation);
|
*location, memberLocation);
|
||||||
|
BReference<ValueLocation> locationRef(memberLocation, true);
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
TRACE_LOCALS(
|
TRACE_LOCALS(
|
||||||
"BListValueNode::ResolvedLocationAndValue(): "
|
"BListValueNode::ResolvedLocationAndValue(): "
|
||||||
"failed to resolve location of header member: %s\n",
|
"failed to resolve location of header member: %s\n",
|
||||||
strerror(error));
|
strerror(error));
|
||||||
delete memberLocation;
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +279,6 @@ BListValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
|
|||||||
BVariant listSize;
|
BVariant listSize;
|
||||||
error = valueLoader->LoadValue(memberLocation, valueType,
|
error = valueLoader->LoadValue(memberLocation, valueType,
|
||||||
false, listSize);
|
false, listSize);
|
||||||
delete memberLocation;
|
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user