]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
metal : fix minor string leaks (ggml/1004)
authorPlamen Minev <redacted>
Fri, 1 Nov 2024 14:55:10 +0000 (16:55 +0200)
committerGeorgi Gerganov <redacted>
Fri, 15 Nov 2024 13:21:04 +0000 (15:21 +0200)
ggml/src/ggml-metal.m

index 80c08f15b2999aecffe61785b620d3f87bd1fa5e..fb2efc66eeca5ff33425a8466c8428ce33bcb6d0 100644 (file)
@@ -450,7 +450,14 @@ static struct ggml_backend_metal_context * ggml_metal_init(ggml_backend_dev_t de
                     GGML_LOG_ERROR("%s: error: %s\n", __func__, [[error description] UTF8String]);
                     return NULL;
                 }
+
+#if !__has_feature(objc_arc)
+                [options release];
+#endif
             }
+#if GGML_METAL_EMBED_LIBRARY
+            [src release];
+#endif // GGML_METAL_EMBED_LIBRARY
         }
     }