We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15f6a9e commit d0887a8Copy full SHA for d0887a8
src/http_server/flb_hs_endpoints.c
@@ -97,7 +97,7 @@ static int endpoint_root(struct flb_hs *hs)
97
out_buf = flb_msgpack_raw_to_json_sds(mp_sbuf.data, mp_sbuf.size);
98
msgpack_sbuffer_destroy(&mp_sbuf);
99
100
- if (out_buf == 0) {
+ if (out_buf) {
101
hs->ep_root_buf = out_buf;
102
hs->ep_root_size = flb_sds_len(out_buf);
103
}
@@ -115,7 +115,7 @@ int flb_hs_endpoints(struct flb_hs *hs)
115
int flb_hs_endpoints_free(struct flb_hs *hs)
116
{
117
if (hs->ep_root_buf) {
118
- flb_free(hs->ep_root_buf);
+ flb_sds_destroy(hs->ep_root_buf);
119
120
121
return 0;
0 commit comments