[flac-dev] [PATCH] Fix cppcheck warnings

Erik de Castro Lopo mle+la at mega-nerd.com
Thu Jan 19 09:44:13 UTC 2017


Rosen Penev wrote:

> index 432e32d..0c2d1ee 100644
> --- a/src/share/utf8/charset.c
> +++ b/src/share/utf8/charset.c
> @@ -522,6 +522,7 @@ int charset_convert(const char *fromcode, const char *tocode,
>    if (to) {
>      newbuf = realloc(tobuf, p - tobuf);
>      *to = newbuf ? newbuf : tobuf;
> +    free(newbuf);

That bit is not actually correct. I've corrected that idependently.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list