From 4d1e689adafb8af45628d0a4f912f82c945411ac Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 24 Nov 2011 15:41:48 -0200 Subject: [PATCH] Format refcount handling --- libkmod/libkmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c index 4407272b..9307f713 100644 --- a/libkmod/libkmod.c +++ b/libkmod/libkmod.c @@ -181,8 +181,8 @@ KMOD_EXPORT struct kmod_ctx *kmod_unref(struct kmod_ctx *ctx) { if (ctx == NULL) return NULL; - ctx->refcount--; - if (ctx->refcount > 0) + + if (--ctx->refcount > 0) return ctx; info(ctx, "context %p released\n", ctx); free(ctx); -- 2.47.2