Fix the gcc warnings in this module (since we now seem to be
[sgt/putty] / logging.c
index c4b4355..652eb9d 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -170,6 +170,14 @@ void *log_init(void *frontend, Config *cfg)
     return ctx;
 }
 
+void log_free(void *handle)
+{
+    struct LogContext *ctx = (struct LogContext *)handle;
+
+    logfclose(ctx);
+    sfree(ctx);
+}
+
 void log_reconfig(void *handle, Config *cfg)
 {
     struct LogContext *ctx = (struct LogContext *)handle;
@@ -182,12 +190,12 @@ void log_reconfig(void *handle, Config *cfg)
        reset_logging = FALSE;
 
     if (reset_logging)
-       logfclose(logctx);
+       logfclose(ctx);
 
     ctx->cfg = *cfg;                  /* STRUCTURE COPY */
 
     if (reset_logging)
-       logfopen(logctx);
+       logfopen(ctx);
 }
 
 /*