From e97d5f54bc3608be8dec1d2d317c18028bb63e15 Mon Sep 17 00:00:00 2001 From: obdev Date: Mon, 3 Jul 2023 12:48:21 +0000 Subject: [PATCH] fix core: Observer crash due to incorrect assessment of allocated buffer in deserialization of ObDynamicSamplePieceMsg. --- src/sql/engine/px/datahub/components/ob_dh_sample.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/engine/px/datahub/components/ob_dh_sample.cpp b/src/sql/engine/px/datahub/components/ob_dh_sample.cpp index beb24a898c..b2d6560953 100644 --- a/src/sql/engine/px/datahub/components/ob_dh_sample.cpp +++ b/src/sql/engine/px/datahub/components/ob_dh_sample.cpp @@ -93,7 +93,7 @@ OB_DEF_DESERIALIZE(ObDynamicSamplePieceMsg) } } else { void *tmp_buf = arena_.alloc(sizeof(ObChunkDatumStore)); - if (OB_ISNULL(buf)) { + if (OB_ISNULL(tmp_buf)) { ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("allocate memory failed", K(ret)); } else {