JSON format: fix some memleaks

This commit is contained in:
李通洲
2023-09-08 20:03:26 +08:00
parent d97b16950c
commit 1cdc99f327
4 changed files with 9 additions and 3 deletions
+1 -2
View File
@@ -36,9 +36,8 @@ next:
if(n->ut_addr_v6[0] || n->ut_addr_v6[1] || n->ut_addr_v6[2] || n->ut_addr_v6[3])
ffStrbufInitF(&user->clientIp, "%u.%u.%u.%u", n->ut_addr_v6[0], n->ut_addr_v6[1], n->ut_addr_v6[2], n->ut_addr_v6[3]);
else
#else
ffStrbufInit(&user->clientIp);
#endif
ffStrbufInit(&user->clientIp);
user->loginTime = (uint64_t) n->ut_tv.tv_sec * 1000 + (uint64_t) n->ut_tv.tv_usec / 1000;
}