common: set dynamic-buffer's data to NULL on reset()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 10 Jun 2020 17:02:29 +0000 (13:02 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 10 Jun 2020 21:30:49 +0000 (17:30 -0400)
commit427d84693052f551da11a175d9a0f74bb6e169b3
tree0c261405719f91e9d331de4db968f9d8f4eccf80
parent12aacdf65716d710aca1bf81a782a2ab7cef8492
common: set dynamic-buffer's data to NULL on reset()

Set 'data' to NULL after the reset of a dynamic_buffer since
re-using it (e.g. appending) will cause realloc to be called
with an invalid pointer.

Not marked as a fix as no code currently re-uses a buffer after
a reset().

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I58fd5bbcfcda9d952748bea17430e2f41b076f3c
src/common/dynamic-buffer.c
This page took 0.02588 seconds and 4 git commands to generate.