src/dird/dir_plugins.c
void free_plugins(JCR *jcr)
{
   Plugin *plugin;
   int i = 0;

   if (!b_plugin_list || !jcr->plugin_ctx_list) {
      return;
   }

   bpContext *plugin_ctx_list = (bpContext *)jcr->plugin_ctx_list;
   Dmsg2(dbglvl, "Free instance dir-plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
   foreach_alist_index(i, plugin, b_plugin_list) {
      /* Free the plugin instance */
      dirplug_func(plugin)->freePlugin(&plugin_ctx_list[i]);
      free(plugin_ctx_list[i].bContext);     /* free Bacula private context */
   }
   free(plugin_ctx_list);
   jcr->plugin_ctx_list = NULL;
}
/*
 * Free the plugin instances for this Job
 */
Free the plugin instances for this Job
Free the plugin instances for this Job
void free_plugins(JCR *jcr)
{
   Plugin *plugin;
   int i = 0;
   if (!b_plugin_list || !jcr->plugin_ctx_list) {
      return;
   }
   bpContext *plugin_ctx_list = (bpContext *)jcr->plugin_ctx_list;
   Dmsg2(dbglvl, "Free instance dir-plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
   foreach_alist_index(i, plugin, b_plugin_list) {
      dirplug_func(plugin)->freePlugin(&plugin_ctx_list[i]);
      free(plugin_ctx_list[i].bContext);     
   }
   free(plugin_ctx_list);
   jcr->plugin_ctx_list = NULL;
}
void free_plugins ( JCR * jcr ) { Plugin * plugin ; int i = 0 ; if ( ! b_plugin_list || ! jcr -> plugin_ctx_list ) { return ; } bpContext * plugin_ctx_list = ( bpContext * ) jcr -> plugin_ctx_list ; Dmsg2 ( dbglvl , " \n " , jcr -> plugin_ctx_list , jcr -> JobId ) ; foreach_alist_index ( i , plugin , b_plugin_list ) { dirplug_func ( plugin ) -> freePlugin ( & plugin_ctx_list [ i ] ) ; free ( plugin_ctx_list [ i ] . bContext ) ; } free ( plugin_ctx_list ) ; jcr -> plugin_ctx_list = NULL ; }
Free the plugin instances for this Job
Free the plugin instances for this Job
/* Free the plugin instance */ /* free Bacula private context */