void test_rp_ctx_cleanup(rp_ctx_t *ctx) { pm_cleanup(ctx->pm_ctx); np_cleanup(ctx->np_ctx); ac_cleanup(ctx->ac_ctx); dm_cleanup(ctx->dm_ctx); free(ctx); }
void die (int result, const char *fmt, ...) { va_list ap; va_start (ap, fmt); vprintf (fmt, ap); va_end (ap); if(this_nagios_plugin) { np_cleanup(); } exit (result); }