ggml : fix gguf string leak when reading kv pairs fails

This commit is contained in:
slaren 2024-10-30 12:48:11 +01:00
parent fc83a9e584
commit 5bd963e90b

View file

@ -22335,11 +22335,11 @@ struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_p
default: GGML_ABORT("invalid type");
}
ctx->header.n_kv++;
if (!ok) {
break;
}
ctx->header.n_kv++;
}
if (!ok) {