Skip to content

Commit 0788df9

Browse files
committed
Fix shrinking realloc in KVStorePendingLookup
1 parent 4b3a1d8 commit 0788df9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/fastly/host-api/host_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4603,7 +4603,7 @@ KVStorePendingLookup::wait() {
46034603
res.emplace(std::nullopt);
46044604
} else {
46054605
if (metadata_nwritten > 0) {
4606-
cabi_realloc(metadata_buf, HOSTCALL_BUFFER_LEN, 1, metadata_nwritten);
4606+
metadata_buf = reinterpret_cast<uint8_t *>(cabi_realloc(metadata_buf, HOSTCALL_BUFFER_LEN, 1, metadata_nwritten));
46074607
res.emplace(std::make_tuple(body, make_host_bytes(metadata_buf, metadata_nwritten), gen_out));
46084608
} else {
46094609
cabi_free(metadata_buf);

0 commit comments

Comments
 (0)