Don't leak so much memory.

This commit is contained in:
Jordan Bancino 2023-05-23 17:53:19 +00:00
parent 42191ec03f
commit 441599b088
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,6 @@
#include <Log.h> #include <Log.h>
#include <Memory.h> #include <Memory.h>
#include <Str.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
@ -209,7 +208,7 @@ LogConfigTimeStampFormatSet(LogConfig * config, char *tsFmt)
{ {
if (config) if (config)
{ {
config->tsFmt = StrDuplicate(tsFmt); config->tsFmt = tsFmt;
} }
} }

View file

@ -180,7 +180,7 @@ encode(char *str)
int int
Main(Array * args) Main(Array * args)
{ {
HashMap *json; HashMap *json = NULL;
int flag = 0; int flag = 0;
int ch; int ch;
char *input = NULL; char *input = NULL;
@ -230,5 +230,6 @@ Main(Array * args)
break; break;
} }
JsonFree(json);
return 0; return 0;
} }