From 9d32f409bcb5e89a9eabcaf7e2c1d90d7128af0c Mon Sep 17 00:00:00 2001 From: obdev Date: Sat, 28 Jan 2023 18:50:41 +0800 Subject: [PATCH] fix the memory_info with NULL label --- deps/oblib/src/lib/alloc/alloc_struct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/oblib/src/lib/alloc/alloc_struct.h b/deps/oblib/src/lib/alloc/alloc_struct.h index 6a4eb95770..fb0f2a585e 100644 --- a/deps/oblib/src/lib/alloc/alloc_struct.h +++ b/deps/oblib/src/lib/alloc/alloc_struct.h @@ -104,7 +104,7 @@ struct ObLabel } // for format print operator const char*() const; - bool is_valid() const { return nullptr != str_; } + bool is_valid() const { return nullptr != str_ && '\0' != str_[0]; } int64_t to_string(char *buf, const int64_t buf_len) const; const char *str_; };