Realloc bufsz only if no error
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 9 Feb 2017 13:06:59 +0000 (14:06 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 9 Feb 2017 13:06:59 +0000 (14:06 +0100)
commit554b93d96dfdfb19bf65a40ad2c20fa80c8dbaf9
treec8b34f1ee15b39a202e40cb78344ba628b16767a
parent33515c77a28ca016579f3dbe87ce2a62d30aeb18
Realloc bufsz only if no error

If the size query call didn't return CL_SUCCESS, there is no need to
resize the buffer, since we're not going to use its value anyway. Plus,
the new size might actually be completely bogus and cause issues.

This should fix Debian Bug #848169.
src/clinfo.c
src/strbuf.h