diff --git a/src/driver/ptyc_driver_ctx.c b/src/driver/ptyc_driver_ctx.c index cd038ee..70d44f5 100644 --- a/src/driver/ptyc_driver_ctx.c +++ b/src/driver/ptyc_driver_ctx.c @@ -271,8 +271,8 @@ void ptyc_free_driver_ctx(struct ptyc_driver_ctx * ctx) uintptr_t addr; if (ctx) { - addr = (uintptr_t)ctx - offsetof(struct ptyc_driver_ctx_alloc,ctx); - addr = addr - offsetof(struct ptyc_driver_ctx_impl,ctx); + addr = (uintptr_t)ctx - offsetof(struct ptyc_driver_ctx_impl,ctx); + addr = addr - offsetof(struct ptyc_driver_ctx_alloc,ctx); ictx = (struct ptyc_driver_ctx_alloc *)addr; ptyc_free_driver_ctx_impl(ictx); }