From a80999fd4f3665de01882dcd9fec6afb2bcf7de4 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sun, 21 Nov 2021 03:41:24 +0800 Subject: [PATCH] moded/RunModel: fix possible memory leak without a virtual destructor (#22990) old-commit-hash: d97ad1302a5ad665caa4cb081ada3db477ebaee4 --- selfdrive/modeld/runners/runmodel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/modeld/runners/runmodel.h b/selfdrive/modeld/runners/runmodel.h index 0893a4acc6..948048f5d3 100644 --- a/selfdrive/modeld/runners/runmodel.h +++ b/selfdrive/modeld/runners/runmodel.h @@ -1,6 +1,7 @@ #pragma once class RunModel { public: + virtual ~RunModel() {} virtual void addRecurrent(float *state, int state_size) {} virtual void addDesire(float *state, int state_size) {} virtual void addTrafficConvention(float *state, int state_size) {}