metal : fix memory leak in early return (llama/28399)

This commit is contained in:
Niklas Wenzel
2026-09-14 20:45:06 +03:00
committed by Georgi Gerganov
parent 0006e3e2e2
commit 614c74ab60
+1
View File
@@ -111,6 +111,7 @@ ggml_metal_t ggml_metal_init(ggml_metal_device_t dev) {
id<MTLCommandQueue> queue = ggml_metal_device_get_queue(dev);
if (queue == nil) {
GGML_LOG_ERROR("%s: error: failed to create command queue\n", __func__);
free(res);
return NULL;
}