diff --git a/src/core/bus/gpio.zig b/src/core/bus/gpio.zig index c5d8dce..60a430d 100644 --- a/src/core/bus/gpio.zig +++ b/src/core/bus/gpio.zig @@ -68,6 +68,8 @@ pub const Gpio = struct { log.info("Device: {}", .{kind}); const self = try allocator.create(Self); + errdefer allocator.destroy(self); + self.* = .{ .data = 0b0000, .direction = 0b1111, // TODO: What is GPIO DIrection set to by default?