diff --git a/src/nouveau/vulkan/nvk_compute_pipeline.c b/src/nouveau/vulkan/nvk_compute_pipeline.c index 11d2959032a..41c763a9591 100644 --- a/src/nouveau/vulkan/nvk_compute_pipeline.c +++ b/src/nouveau/vulkan/nvk_compute_pipeline.c @@ -101,6 +101,7 @@ nvk_compute_pipeline_create(struct nvk_device *device, nvk_lower_nir(device, nir, pipeline_layout); result = nvk_compile_nir(pdevice, nir, &pipeline->base.shaders[MESA_SHADER_COMPUTE]); + ralloc_free(nir); if (result != VK_SUCCESS) goto fail; diff --git a/src/nouveau/vulkan/nvk_shader.c b/src/nouveau/vulkan/nvk_shader.c index f496866eaf3..d9dc08f2ffa 100644 --- a/src/nouveau/vulkan/nvk_shader.c +++ b/src/nouveau/vulkan/nvk_shader.c @@ -193,7 +193,6 @@ nvk_compile_nir(struct nvk_physical_device *device, nir_shader *nir, if (info_out.io.fp64) shader->hdr[0] |= 1 << 27; - ralloc_free(nir); return VK_SUCCESS; }