mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
MINOR: qpack: fix memory leak on huffman decoding
Remove an unneeded strdup invocation during QPACK huffman decoding. A temporary storage buffer is passed by the function and exists after decoding so no need to duplicate memory here.
This commit is contained in:
parent
3a590c7ff2
commit
9c8c4fa3a2
@ -311,7 +311,9 @@ int qpack_decode_fs(const unsigned char *raw, size_t len, struct buffer *tmp,
|
||||
}
|
||||
|
||||
qpack_debug_printf(stderr, " [name huff %d->%d '%s']", (int)length, (int)nlen, trash);
|
||||
list[hdr_idx].v = ist(strdup(trash));
|
||||
/* makes an ist from tmp storage */
|
||||
b_add(tmp, nlen);
|
||||
list[hdr_idx].v = ist2(trash, nlen);
|
||||
}
|
||||
/* XXX Value string XXX */
|
||||
raw += length;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user