Skip to content

Commit c749b86

Browse files
hexagon: don't forget to delete the backend on free
1 parent dc001b9 commit c749b86

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ggml/src/ggml-hexagon/ggml-hexagon.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,8 +3054,9 @@ static const char * ggml_backend_hexagon_name(ggml_backend_t backend) {
30543054
}
30553055

30563056
static void ggml_backend_hexagon_free(ggml_backend_t backend) {
3057-
auto sess = static_cast<ggml_hexagon_session *>(backend->context);
3058-
GGML_UNUSED(sess);
3057+
// we just need to delete the backend here
3058+
// the sessions are allocated & freed as part of the registry
3059+
delete backend;
30593060
}
30603061

30613062
static inline bool op_reuse_src1(const ggml_tensor * op1, const ggml_tensor * op0) {

0 commit comments

Comments
 (0)