LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2.6.20 06/10] nfnetlink_log: micro-optimization: don't modify destroyed instance
@ 2007-02-12  0:39 Michał Mirosław
  0 siblings, 0 replies; only message in thread
From: Michał Mirosław @ 2007-02-12  0:39 UTC (permalink / raw)
  To: netfilter-devel; +Cc: linux-kernel

Simple micro-optimization: Don't change any options if the instance is
being destroyed.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

--- linux-2.6.20/net/netfilter/nfnetlink_log.c.4	2007-02-11 20:46:26.000000000 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c	2007-02-11 22:24:56.000000000 +0100
@@ -829,7 +829,8 @@ nfulnl_recv_config(struct sock *ctnl, st
 			}
 
 			instance_destroy(inst);
-			break;
+			/* no point in changing anything in destroyed instance */
+			goto out_put;
 		case NFULNL_CFG_CMD_PF_BIND:
 			UDEBUG("registering log handler for pf=%u\n", pf);
 			ret = nf_log_register(pf, &nfulnl_logger);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-12  9:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12  0:39 [PATCH 2.6.20 06/10] nfnetlink_log: micro-optimization: don't modify destroyed instance Michał Mirosław

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).