svn commit: r212090 - projects/sv/sys/net
Attilio Rao
attilio at FreeBSD.org
Wed Sep 1 10:50:58 UTC 2010
Author: attilio
Date: Wed Sep 1 10:50:58 2010
New Revision: 212090
URL: http://svn.freebsd.org/changeset/base/212090
Log:
Fix a lock-leak due to wrong movement.
Modified:
projects/sv/sys/net/netdump_client.c
Modified: projects/sv/sys/net/netdump_client.c
==============================================================================
--- projects/sv/sys/net/netdump_client.c Wed Sep 1 10:07:40 2010 (r212089)
+++ projects/sv/sys/net/netdump_client.c Wed Sep 1 10:50:58 2010 (r212090)
@@ -1197,17 +1197,17 @@ netdump_trigger(void *arg, int howto)
return;
}
+ /* Make the card use *our* receive callback */
+ old_if_input = nd_nic->if_input;
+ nd_nic->if_input = netdump_pkt_in;
+
/* Check if we can use polling */
if (!(nd_nic->if_capenable & IFCAP_POLLING)) {
printf("netdump_trigger: Can't dump: interface %s does not have"
" polling enabled.\n", nd_nic->if_xname);
- dumping--;
- return;
+ goto trig_abort;
}
- /* Make the card use *our* receive callback */
- old_if_input = nd_nic->if_input;
- nd_nic->if_input = netdump_pkt_in;
if (nd_gw.s_addr == INADDR_ANY) {
nd_gw.s_addr = nd_server.s_addr;
}
More information about the svn-src-projects
mailing list