Fix memory leak in SetOpAttrValueScalar
PiperOrigin-RevId: 306892886 Change-Id: I081750fba3407edc5974d5c16ac0a0bca84c4da9
This commit is contained in:
parent
cafdb61a56
commit
28caea9247
@ -1587,6 +1587,7 @@ void SetOpAttrValueScalar(TFE_Context* ctx, TFE_Op* op,
|
|||||||
// require TFE_Op* and just convert it internally a NameAttrValue, so
|
// require TFE_Op* and just convert it internally a NameAttrValue, so
|
||||||
// consider adding an overload to the C API to make this case easier.
|
// consider adding an overload to the C API to make this case easier.
|
||||||
TFE_OpSetAttrFunction(op, attr_name, func_op);
|
TFE_OpSetAttrFunction(op, attr_name, func_op);
|
||||||
|
TFE_DeleteOp(func_op);
|
||||||
} break;
|
} break;
|
||||||
case tensorflow::AttrValue::kList:
|
case tensorflow::AttrValue::kList:
|
||||||
TF_FALLTHROUGH_INTENDED;
|
TF_FALLTHROUGH_INTENDED;
|
||||||
|
Loading…
Reference in New Issue
Block a user