Skip to contentSkip to conversation

nfnetlink_log: micro-optimization: don't modify destroyed instance

PATCH Applied Michał Mirosław 1 participant 1 message Feb 12, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/10 nfnetlink_log: micro-optimization: don't modify destroyed instance

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

net/netfilter/nfnetlink_log.c renamed from net/netfilter/nfnetlink_log.c.4 +2 -1
@@ -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);