Make sure destroy function was defined before trying to call it.
authorJustin Pettit <jpettit@nicira.com>
Tue, 20 May 2008 19:43:19 +0000 (12:43 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 20 May 2008 19:43:19 +0000 (12:43 -0700)
datapath/chain.c

index 2b1178b8a5cd134d23bcfbfc390bcf7912aa7c15..c857e9a1547af6b728506a6b1ea8a1e50d00725f 100644 (file)
@@ -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);