]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
examples/yolo: fix load_model memory leak (#1432)
authorDavid366AI <redacted>
Sun, 15 Mar 2026 18:02:34 +0000 (14:02 -0400)
committerGitHub <redacted>
Sun, 15 Mar 2026 18:02:34 +0000 (20:02 +0200)
examples/yolo/yolov3-tiny.cpp

index b02e7d204100055c640b371978786268350ec5c1..715c5daa123ea188b25ea4e34d0a9f900586bc7a 100644 (file)
@@ -107,7 +107,8 @@ static bool load_model(const std::string & fname, yolo_model & model) {
         ggml_backend_tensor_set(cur, ggml_get_data(src), 0, n_size);
     }
     gguf_free(gguf_ctx);
-
+    ggml_free(tmp_ctx);
+    
     model.width  = 416;
     model.height = 416;
     model.conv2d_layers.resize(13);