netgraph7-nullify-apply-after-callback.patch

nant, 05/10/2013 11:20 PM

Download (705 Bytes)

View differences:

sys/netgraph7/netgraph/ng_base.c
1977 1977
		if (refcount_release(&item->apply->refs)) {
1978 1978
			(*item->apply->apply)(item->apply->context,
1979 1979
			    item->apply->error);
1980
			item->apply = NULL;
1980 1981
		}
1981 1982
	}
1982 1983

  
......
2139 2140
	if (apply != NULL) {
2140 2141
		if (depth == 1 && error != 0)
2141 2142
			apply->error = error;
2142
		if (refcount_release(&apply->refs))
2143
		if (refcount_release(&apply->refs)) {
2143 2144
			(*apply->apply)(apply->context, apply->error);
2145
			item->apply = NULL;
2146
		}
2144 2147
	}
2145 2148

  
2146 2149
	return (error);