return TM_ECODE_OK;
}
+static void OutputTlsLogDeinit(OutputCtx *output_ctx)
+{
+ OutputTlsLoggerDisable();
+
+ OutputTlsCtx *tls_ctx = output_ctx->data;
+ LogFileCtx *logfile_ctx = tls_ctx->file_ctx;
+ LogFileFreeCtx(logfile_ctx);
+ SCFree(tls_ctx);
+ SCFree(output_ctx);
+}
#define DEFAULT_LOG_FILENAME "tls.json"
OutputCtx *OutputTlsLogInit(ConfNode *conf)
}
}
output_ctx->data = tls_ctx;
- output_ctx->DeInit = NULL;
+ output_ctx->DeInit = OutputTlsLogDeinit;
return output_ctx;
}
+static void OutputTlsLogDeinitSub(OutputCtx *output_ctx)
+{
+ OutputTlsLoggerDisable();
+
+ OutputTlsCtx *tls_ctx = output_ctx->data;
+ SCFree(tls_ctx);
+ SCFree(output_ctx);
+}
+
OutputCtx *OutputTlsLogInitSub(ConfNode *conf, OutputCtx *parent_ctx)
{
AlertJsonThread *ajt = parent_ctx->data;
}
}
output_ctx->data = tls_ctx;
- output_ctx->DeInit = NULL;
+ output_ctx->DeInit = OutputTlsLogDeinitSub;
return output_ctx;
}