log BUGFIX memory leak
diff --git a/src/log.c b/src/log.c
index 2c5093d..45ead66 100644
--- a/src/log.c
+++ b/src/log.c
@@ -641,10 +641,10 @@
             e = ly_err_last(ctx);
             vecode = e->vecode;
         }
+        free_strs = 0;
         if (log_store(ctx, level, err, vecode, msg, data_path, schema_path, line, apptag ? strdup(apptag) : NULL)) {
             goto cleanup;
         }
-        free_strs = 0;
     }
 
     /* if we are only storing errors internally, never print the message (yet) */