From: Thomas Jarosch Date: Thu, 14 Apr 2005 13:48:17 +0000 (+0000) Subject: libipt_ACCOUNT: (tomj) fix long standing "Invalid handle for ipt_acc_handle_free... X-Git-Tag: v1.2~2 X-Git-Url: http://developer.intra2net.com/git/?p=libipt_ACCOUNT;a=commitdiff_plain;h=a92b7b942ef323f4c58f7e9d4801cd8253417da4 libipt_ACCOUNT: (tomj) fix long standing "Invalid handle for ipt_acc_handle_free() specified: 3482432576" bug --- diff --git a/src/ipt_ACCOUNT_cl.c b/src/ipt_ACCOUNT_cl.c index 1791eaa..0d8d4d8 100644 --- a/src/ipt_ACCOUNT_cl.c +++ b/src/ipt_ACCOUNT_cl.c @@ -19,6 +19,7 @@ int ipt_ACCOUNT_init(struct ipt_ACCOUNT_context *ctx) { memset (ctx, 0, sizeof(struct ipt_ACCOUNT_context)); + ctx->handle.handle_nr = -1; ctx->sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); if (ctx->sockfd < 0) { @@ -152,6 +153,7 @@ int ipt_ACCOUNT_get_handle_usage(struct ipt_ACCOUNT_context *ctx) ctx->error_str = "Can't get handle usage information from kernel"; return -1; } + ctx->handle.handle_nr = -1; return ctx->handle.itemcount; }