Cleanup: Memory leak in UI_OT_eyedropper_depth

Shouldn't be triggered by normal operation, but better to fix it just in case.
This commit is contained in:
Lukas Stockner
2024-06-20 22:52:22 +02:00
parent 56904553ec
commit bbf7940d34

View File

@@ -156,6 +156,7 @@ static int depthdropper_init(bContext *C, wmOperator *op)
char *prop_data_path = RNA_string_get_alloc(op->ptr, "prop_data_path", nullptr, 0, nullptr);
BLI_SCOPED_DEFER([&] { MEM_SAFE_FREE(prop_data_path); });
if (!prop_data_path) {
MEM_freeN(ddr);
return false;
}
PointerRNA ctx_ptr = RNA_pointer_create(nullptr, &RNA_Context, C);