提交 810b40dd 编写于 作者: sangshuduo's avatar sangshuduo

fix pStr memory leak in tscUtil.c

上级 44e0ee9f
...@@ -87,6 +87,7 @@ void tscGetMetricMetaCacheKey(SQueryInfo* pQueryInfo, char* str, uint64_t uid) { ...@@ -87,6 +87,7 @@ void tscGetMetricMetaCacheKey(SQueryInfo* pQueryInfo, char* str, uint64_t uid) {
MD5Update(&ctx, (uint8_t*)tmp, keyLen); MD5Update(&ctx, (uint8_t*)tmp, keyLen);
char* pStr = base64_encode(ctx.digest, tListLen(ctx.digest)); char* pStr = base64_encode(ctx.digest, tListLen(ctx.digest));
strcpy(str, pStr); strcpy(str, pStr);
free(pStr);
} }
free(tmp); free(tmp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册