We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d229d72 commit 4a82f95Copy full SHA for 4a82f95
src/export_cache.cpp
@@ -292,6 +292,9 @@ void export_cache(py::module& m) {
292
if (obj == LHD_HIT_MARKER) {
293
cache_obj_t* dummy_obj =
294
static_cast<cache_obj_t*>(calloc(1, sizeof(cache_obj_t)));
295
+ if (dummy_obj == nullptr) {
296
+ throw std::bad_alloc();
297
+ }
298
dummy_obj->obj_id = req.obj_id;
299
dummy_obj->obj_size = req.obj_size;
300
return py::cast(
0 commit comments