d/vive: close the zlib inflate stream

fixes memory leaks of zlib stream internal state
This commit is contained in:
Christoph Haag 2020-08-05 18:30:09 +02:00 committed by Jakob Bornecrantz
parent 12c0f5d75a
commit 2b20ee1f12

View file

@ -138,6 +138,9 @@ vive_read_config(struct os_hid_device *hid_dev)
config_json[strm.total_out] = '\0';
U_ARRAY_REALLOC_OR_FREE(config_json, unsigned char, strm.total_out + 1);
inflateEnd(&strm);
return (char *)config_json;
}