The qapi string-input and string-output visitors can leak memory when used on integer lists that were set up such that the range list needed to merge adjacent/overlapping ranges; detected by valgrind on test-string-{input,output}-visitor.
It doesn't hurt that the overall series removes more code than it adds (modulo copyright blurbs) v2: - split out new patch 1 util/range.c, to make code motion easier to follow - address review comments from Markus Eric Blake (3): range: Create range.c for code that should not be inline qapi: Simplify use of range.h qapi: Fix memleak in string visitors on int lists include/qemu/range.h | 91 ++++++++++---------------------------------- qapi/string-input-visitor.c | 17 ++------- qapi/string-output-visitor.c | 4 +- util/range.c | 76 ++++++++++++++++++++++++++++++++++++ util/Makefile.objs | 1 + 5 files changed, 104 insertions(+), 85 deletions(-) create mode 100644 util/range.c -- 2.5.5