From: Kuzin Andrey <kuzinandrey@yandex.ru>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH] libnfnetlink-1.0.0 iftable.c:nlif_open() has handler unregister error
Date: Thu, 30 Sep 2010 10:48:14 +0400 [thread overview]
Message-ID: <199131285829294@web100.yandex.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
struct nlif_handle *nlif_open(void)
{
..........
if (rtnl_handler_register(h->rtnl_handle, &h->ifadd_handler) < 0)
goto err_close;
if (rtnl_handler_register(h->rtnl_handle, &h->ifdel_handler) < 0)
goto err_unregister;
return h;
err_unregister:
rtnl_handler_unregister(h->rtnl_handle, &h->ifdel_handler);
err_close:
rtnl_close(h->rtnl_handle);
free(h);
err:
return NULL;
}
Here if was error after rtnl_handler_register(... ifdel_handler...) need to unregister the ifadd_handler,
but in err_unregister: try to unregister the the ifdel_handler.
[-- Attachment #2: 2.patch --]
[-- Type: application/octet-stream, Size: 372 bytes --]
--- ./a/iftable.c 2009-01-07 04:32:26.000000000 +0300
+++ ./b/iftable.c 2010-09-30 10:35:30.000000000 +0400
@@ -245,7 +245,7 @@ struct nlif_handle *nlif_open(void)
return h;
err_unregister:
- rtnl_handler_unregister(h->rtnl_handle, &h->ifdel_handler);
+ rtnl_handler_unregister(h->rtnl_handle, &h->ifadd_handler);
err_close:
rtnl_close(h->rtnl_handle);
free(h);
next reply other threads:[~2010-09-30 6:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 6:48 Kuzin Andrey [this message]
2010-09-30 11:28 ` [PATCH] libnfnetlink-1.0.0 iftable.c:nlif_open() has handler unregister error Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199131285829294@web100.yandex.ru \
--to=kuzinandrey@yandex.ru \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.