diff --git a/tools/compute_image_mean.cpp b/tools/compute_image_mean.cpp index 20f1ff81f1c..6821e94253f 100644 --- a/tools/compute_image_mean.cpp +++ b/tools/compute_image_mean.cpp @@ -157,6 +157,7 @@ int main(int argc, char** argv) { // Clean up if (db_backend == "leveldb") { + delete it; delete db; } else if (db_backend == "lmdb") { mdb_cursor_close(mdb_cursor);