/* * Destroy a context */ extern int plugin_context_destroy(plugin_context_t *c) { int rc = SLURM_SUCCESS; /* * Must check return code here because plugins might still * be loaded and active. */ if (c->plugin_list) { if (plugrack_destroy(c->plugin_list) != SLURM_SUCCESS) rc = SLURM_ERROR; } else plugin_unload(c->cur_plugin); xfree(c->type); xfree(c); return rc; }
/* * Destroy a node selection context */ static int _select_context_destroy( slurm_select_context_t *c ) { int rc = SLURM_SUCCESS; /* * Must check return code here because plugins might still * be loaded and active. */ if ( c->plugin_list ) { if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { rc = SLURM_ERROR; } } else { plugin_unload(c->cur_plugin); } xfree(c->select_type); return rc; }