From: Thomas Jarosch Date: Tue, 20 Apr 2004 13:19:06 +0000 (+0000) Subject: libipt_ACCOUNT: (tomj) fixed illegal handle free issue on deinit X-Git-Tag: v1.1~4 X-Git-Url: http://developer.intra2net.com/git/?p=libipt_ACCOUNT;a=commitdiff_plain;h=6a4a14ebf16a59a1aa60006c34b4b4b7bac2be4f libipt_ACCOUNT: (tomj) fixed illegal handle free issue on deinit --- diff --git a/src/ipt_ACCOUNT_cl.c b/src/ipt_ACCOUNT_cl.c index d773b3d..aa4937a 100644 --- a/src/ipt_ACCOUNT_cl.c +++ b/src/ipt_ACCOUNT_cl.c @@ -44,7 +44,7 @@ int ipt_ACCOUNT_init(struct ipt_ACCOUNT_context *ctx) void ipt_ACCOUNT_free_entries(struct ipt_ACCOUNT_context *ctx) { - if (ctx->handle.handle_nr >= 0) + if (ctx->handle.handle_nr != -1) { setsockopt(ctx->sockfd, IPPROTO_IP, IPT_SO_SET_ACCOUNT_HANDLE_FREE, &ctx->handle, sizeof (struct ipt_account_handle_sockopt)); ctx->handle.handle_nr = -1;