Change errdefers in create()/init() functions

They should use gpa.destroy() instead of foo.destroy() because (most) of
them have fields that may not be initialized by the first error, so
the foo.destroy() could crash.
This commit is contained in:
Ben Buhse 2026-02-13 19:30:21 -06:00
commit 6bf607b759
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
11 changed files with 12 additions and 11 deletions

View file

@ -185,7 +185,7 @@ fn run(wl_display: *wl.Display, context: *Context) !void {
}
fn parseArgs() void {
const result = flags.parser([*:0]const u8, &.{
const result = flags.Parser([*:0]const u8, &.{
.{ .name = "h", .kind = .boolean },
.{ .name = "version", .kind = .boolean },
.{ .name = "log-level", .kind = .arg },