Commit d53830cd authored by James Keeling's avatar James Keeling Committed by TensorFlower Gardener
Browse files

Update TF_ApiDefMapGet to return nullptr if there is an error.

Previously it would return an allocated buffer, even if there was an error and the buffer was not usable. This could cause memory leaks if the caller did not manually delete the buffer.

Because TF_DeleteBuffer has been updated to be safe to call on nullptr, it's still OK if callers attempt to delete this nullptr.

PiperOrigin-RevId: 205858542
parent aef000ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment