On 10/5/18 8:48 AM, Alex Bennée wrote: > The original dfilter was patched to avoid a leak in the case of > multiple -dfilter ranges. There is no reason not to allow the user to > stack several dfilter options rather than push them all into one mega > line. We avoid the leak by simply only allocating the first time > around. As we are using a g_array it will automatically re-size as > needed. > > The allocation is pushed to a helper as future patches will offer > additional ways to add to the dfilter. > > We also add a helper qemu_reset_dfilter_ranges() so we can be explicit > in our unit tests. > > Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > --- > include/qemu/log.h | 1 + > tests/test-logging.c | 14 ++++++++++++++ > util/log.c | 23 +++++++++++++++++------ > 3 files changed, 32 insertions(+), 6 deletions(-)
Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~