authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-11 02:57:35 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-11 02:57:35 -07:00
log60b391edd06236b887dd17cfcc9b25c73b4fe00e
treedefe010dae4d0be4b198ed39a881f3f1cc63cf4a
parentc1d5247b88cad7ae7b229aaf56c8257ce95c0bf7
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

Signature.from: add missing defer's


1 files changed, 5 insertions(+), 0 deletions(-)

git.zig+5
......@@ -2199,10 +2199,15 @@ pub const Signature = union(enum) {
21992199 const sigversion = try b64r.readInt(u32, .big);
22002200 if (sigversion != 1) return .unrecognized;
22012201 const publickey = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big));
2202 errdefer allocator.free(publickey);
22022203 const namespace = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big));
2204 defer allocator.free(namespace);
22032205 const reserved = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big));
2206 defer allocator.free(reserved);
22042207 const hash_algorithm = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big));
2208 errdefer allocator.free(hash_algorithm);
22052209 const signature = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big));
2210 errdefer allocator.free(signature);
22062211 if (!std.mem.eql(u8, namespace, "git")) return .unrecognized;
22072212 if (reserved.len > 0) return .unrecognized;
22082213