Skip to content

Commit

Permalink
Fix leak of CoreFoundation objects during calls to vkUseIOSurfaceMVK()
Browse files Browse the repository at this point in the history
A small leak occurs if no existing IOSurface is provided to vkUseIOSurfaceMVK() because CoreFoundation objects returned from functions with Create in their name must be released with CFRelease()
  • Loading branch information
bangnoise committed Apr 8, 2022
1 parent 76aca81 commit 9f5bd82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MoltenVK/MoltenVK/GPUObjects/MVKImage.mm
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,10 @@
});
}
CFDictionaryAddValue(properties, (id)kIOSurfacePlaneInfo, planeProperties);
CFRelease(planeProperties);
}
_ioSurface = IOSurfaceCreate(properties);
CFRelease(properties);
}
}

Expand Down

0 comments on commit 9f5bd82

Please sign in to comment.