| ... | @@ -283,7 +283,7 @@ pub const Connection = struct { | ... | @@ -283,7 +283,7 @@ pub const Connection = struct { |
| 283 | fn destroy(plain: *Plain) void { | 283 | fn destroy(plain: *Plain) void { |
| 284 | const c = &plain.connection; | 284 | const c = &plain.connection; |
| 285 | const gpa = c.client.allocator; | 285 | const gpa = c.client.allocator; |
| 286 | const base: [*]u8 = @ptrCast(plain); | 286 | const base: [*]align(@alignOf(Plain)) u8 = @ptrCast(plain); |
| 287 | gpa.free(base[0..allocLen(c.client, c.host_len)]); | 287 | gpa.free(base[0..allocLen(c.client, c.host_len)]); |
| 288 | } | 288 | } |
| 289 | | 289 | |
| ... | @@ -356,7 +356,7 @@ pub const Connection = struct { | ... | @@ -356,7 +356,7 @@ pub const Connection = struct { |
| 356 | fn destroy(tls: *Tls) void { | 356 | fn destroy(tls: *Tls) void { |
| 357 | const c = &tls.connection; | 357 | const c = &tls.connection; |
| 358 | const gpa = c.client.allocator; | 358 | const gpa = c.client.allocator; |
| 359 | const base: [*]u8 = @ptrCast(tls); | 359 | const base: [*]align(@alignOf(Tls)) u8 = @ptrCast(tls); |
| 360 | gpa.free(base[0..allocLen(c.client, c.host_len)]); | 360 | gpa.free(base[0..allocLen(c.client, c.host_len)]); |
| 361 | } | 361 | } |
| 362 | | 362 | |