diff --git a/export/planloader/planloader.cpp b/export/planloader/planloader.cpp index 6ecf5e2d..14685c53 100644 --- a/export/planloader/planloader.cpp +++ b/export/planloader/planloader.cpp @@ -36,10 +36,10 @@ SerializedPlan* load_substrait_plan(const char* filename) { void free_substrait_plan(SerializedPlan* plan) { if (plan->buffer) { - delete plan->buffer; + delete[] plan->buffer; } if (plan->errorMessage) { - delete plan->errorMessage; + delete[] plan->errorMessage; } delete plan; }