Skip to content

Commit

Permalink
Coverity fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
atobiszei committed Apr 16, 2024
1 parent 8435706 commit a2f5f00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ http_archive(
git_repository(
name = "mediapipe",
remote = "https://github.com/openvinotoolkit/mediapipe",
commit = "0d5cbdbbee501b796217c7520ac0f2fd94920657", # Working log_level and validate (#69)
commit = "06ad1ed33930c6f6675c98c75684fb4ce128b550", # Fix leak (#72)
)

# DEV mediapipe 1 source - adjust local repository path for build
Expand Down
4 changes: 3 additions & 1 deletion src/python/ovms_py_tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ OvmsPyTensor::OvmsPyTensor(const std::string& name, const std::vector<py::ssize_
if (allocate) {
ownedDataPtr = std::make_unique<char[]>(size);
ptr = this->ownedDataPtr.get();
} else {
ptr = nullptr
}
}

OvmsPyTensor::OvmsPyTensor(const std::string& name, void* data, const std::vector<py::ssize_t>& shape, const std::string& datatype, py::ssize_t size, bool copy) :
OvmsPyTensor(name, shape, datatype, size, copy) {
OvmsPyTensor(name, shape, datatype, size, /*allocate=*/copy) {
if (copy) {
memcpy(this->ownedDataPtr.get(), data, size);
} else {
Expand Down

0 comments on commit a2f5f00

Please sign in to comment.