diff --git a/dnn/src/common/cv/filter.cpp b/dnn/src/common/cv/filter.cpp index 7e2e6297a0800a4b478cc43bf7bfe55961006865..810010b389506ad3addaa3e413544f335599ef02 100644 --- a/dnn/src/common/cv/filter.cpp +++ b/dnn/src/common/cv/filter.cpp @@ -106,10 +106,8 @@ FilterEngine::FilterEngine(BaseRowFilter* row_filter, template FilterEngine::~FilterEngine() { - if (m_row_filter != NULL) - delete m_row_filter; - if (m_column_filter != NULL) - delete m_column_filter; + delete m_row_filter; + delete m_column_filter; } template diff --git a/src/jit/impl/halide/halide_executable.cpp b/src/jit/impl/halide/halide_executable.cpp index 96b8fd27e28bef841ac601448734ab267313d311..ec29d4fd7ebd1d67b5e0e5e438698151a3a9594f 100644 --- a/src/jit/impl/halide/halide_executable.cpp +++ b/src/jit/impl/halide/halide_executable.cpp @@ -25,9 +25,7 @@ HalideExecutable::FunctionHandle::~FunctionHandle() { device_release(i.second); } } - if (uctx_map) { - delete uctx_map; - } + delete uctx_map; if (dl_handle) { ExecutableHelper::get().unload_lib(dl_handle); }