Skip to content

Commit e94ca62

Browse files
committed
Make asan happy
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
1 parent 4fff1c5 commit e94ca62

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

rwkv.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ void rwkv_free(struct rwkv_context * ctx) {
207207
ggml_backend_sched_free(ctx->sequential_graph.sched);
208208
ggml_free(ctx->sequential_graph.ggml_ctx);
209209
}
210+
211+
delete ctx;
210212
}
211213

212214
// API function.

rwkv_utilities.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ static bool rwkv_fread_string(FILE * file, const size_t length, std::string & de
4040
if (ret == 1) {
4141
dest.assign(buffer, length);
4242
}
43+
delete[] buffer;
4344
return ret == 1;
4445
}
4546

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy