TS-1913: Fix resolve_logfield_string()

When bytes_resolved is 0, we should free result directly,
or it will return the not-null result to the caller with
the strlen(result) is 0, which will lead to ATS crash.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Signed-off-by: Zhao Yongming <ming.zym@gmail.com>