git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8080
91ce42f0-d328-0410-95d8-
f526ca767f89
Dmsg2(dbglvl, "Free instance plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
foreach_alist(plugin, plugin_list) {
/* Free the plugin instance */
- plug_func(plugin)->freePlugin(&plugin_ctx_list[i++]);
+ plug_func(plugin)->freePlugin(&plugin_ctx_list[i]);
+ plugin_ctx_list[i].bContext = NULL;
+ plugin_ctx_list[i].pContext = NULL;
+ i++;
}
free(plugin_ctx_list);
jcr->plugin_ctx_list = NULL;
jcr->rstore_source = NULL;
}
- free_plugins(jcr); /* release instantiated plugins */
-
/* Delete lists setup to hold storage pointers */
free_rwstorage(jcr);
if (jcr->JobId != 0)
write_state_file(director->working_directory, "bacula-dir", get_first_port_host_order(director->DIRaddrs));
+ free_plugins(jcr); /* release instantiated plugins */
+
Dmsg0(200, "End dird free_jcr\n");
}