diff --git a/source/blender/editors/curve/editfont.cc b/source/blender/editors/curve/editfont.cc index 9edfd527239..002b7374a8d 100644 --- a/source/blender/editors/curve/editfont.cc +++ b/source/blender/editors/curve/editfont.cc @@ -2417,14 +2417,13 @@ static void font_ui_template_init(bContext *C, wmOperator *op) { PropertyPointerRNA *pprop; - op->customdata = pprop = static_cast( - MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA")); + op->customdata = pprop = MEM_new("OpenPropertyPointerRNA"); UI_context_active_but_prop_get_templateID(C, &pprop->ptr, &pprop->prop); } static void font_open_cancel(bContext * /*C*/, wmOperator *op) { - MEM_freeN(op->customdata); + MEM_delete(static_cast(op->customdata)); op->customdata = nullptr; } @@ -2462,7 +2461,7 @@ static int font_open_exec(bContext *C, wmOperator *op) RNA_property_update(C, &pprop->ptr, pprop->prop); } - MEM_freeN(op->customdata); + MEM_delete(static_cast(op->customdata)); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/sound/sound_ops.cc b/source/blender/editors/sound/sound_ops.cc index db8fecb234e..16e9eb83748 100644 --- a/source/blender/editors/sound/sound_ops.cc +++ b/source/blender/editors/sound/sound_ops.cc @@ -57,7 +57,7 @@ static void sound_open_cancel(bContext * /*C*/, wmOperator *op) { - MEM_freeN(op->customdata); + MEM_delete(static_cast(op->customdata)); op->customdata = nullptr; } diff --git a/source/blender/editors/space_text/text_ops.cc b/source/blender/editors/space_text/text_ops.cc index 5c3d7635b24..f9326edd450 100644 --- a/source/blender/editors/space_text/text_ops.cc +++ b/source/blender/editors/space_text/text_ops.cc @@ -395,7 +395,7 @@ static void text_open_init(bContext *C, wmOperator *op) static void text_open_cancel(bContext * /*C*/, wmOperator *op) { - MEM_freeN(op->customdata); + MEM_delete(static_cast(op->customdata)); } static int text_open_exec(bContext *C, wmOperator *op)