diff --git a/src/flb_pack_gelf.c b/src/flb_pack_gelf.c index 883e489b7c4..241f2c24320 100644 --- a/src/flb_pack_gelf.c +++ b/src/flb_pack_gelf.c @@ -801,6 +801,7 @@ flb_sds_t flb_msgpack_raw_to_gelf(char *buf, size_t buf_size, msgpack_unpacked_init(&result); ret = msgpack_unpack_next(&result, buf, buf_size, &off); if (ret != MSGPACK_UNPACK_SUCCESS) { + msgpack_unpacked_destroy(&result); return NULL; }