From 4252da8834e6af6a3c99f0e657ad4b7e5531b2bd Mon Sep 17 00:00:00 2001 From: Dominic Pelini Date: Tue, 28 May 2024 16:33:45 -0600 Subject: [PATCH] Fixed as_bytes_init_wrap to use heap_b when needed --- src/main/conversions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/conversions.c b/src/main/conversions.c index 9d7469302..9a964a41e 100644 --- a/src/main/conversions.c +++ b/src/main/conversions.c @@ -1183,7 +1183,7 @@ as_status pyobject_to_val(AerospikeClient *self, as_error *err, if (allocate_buffer) { uint8_t* heap_b = (uint8_t *)malloc(b_len); memcpy(heap_b, b, b_len); - as_bytes_init_wrap(bytes, b, b_len, true); + as_bytes_init_wrap(bytes, heap_b, b_len, true); } else {