From: Justin Pettit Date: Tue, 20 May 2008 19:43:19 +0000 (-0700) Subject: Make sure destroy function was defined before trying to call it. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b968c34567689689ef4cfe268f2321d27bd54346;p=openvswitch Make sure destroy function was defined before trying to call it. --- diff --git a/datapath/chain.c b/datapath/chain.c index 2b1178b8..c857e9a1 100644 --- a/datapath/chain.c +++ b/datapath/chain.c @@ -153,7 +153,8 @@ void chain_destroy(struct sw_chain *chain) synchronize_rcu(); for (i = 0; i < chain->n_tables; i++) { struct sw_table *t = chain->tables[i]; - t->destroy(t); + if (t->destroy) + t->destroy(t); } module_put(chain->owner); kfree(chain);