tag 19578 notabug
close 19578
stop
On 13/01/15 09:35, Daiki Ueno wrote:
Zhaopeng Li z...@ustc.edu.cn writes:
At line 534 of coreutils/lib/locale_charset.c, var ‘aliases' points
to a buffer which is allocated using malloc() .
This buffer is not freed when codeset is still an empty string
At line 589 of coreutils/lib/locale_charset.c, var ‘aliases' points to a buffer
which is allocated using malloc() .This buffer is not freed when codeset is
still an empty string after the loop (Line 589~597).
So it will be leaked under such situation.
Our static analysis tool reports this
Zhaopeng Li z...@ustc.edu.cn writes:
At line 534 of coreutils/lib/locale_charset.c, var ‘aliases' points
to a buffer which is allocated using malloc() .
This buffer is not freed when codeset is still an empty string after
the loop (Line 534~542).
So it will be leaked under such situation.
At line 221, the assignment (old_res_ptr = res_ptr) will lead to memory leak
when iteration of corresponding loop is greater than 3.
189
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/localcharset.c;h=b4af28cd#l189
/* Parse the file's contents. */
190
forcemerge 19580 19578
stop
On 13/01/15 10:31, Zhaopeng Li wrote:
At line 221, the assignment (old_res_ptr = res_ptr) will lead to memory leak
when iteration of corresponding loop is greater than 3.
Same non issue really.
We don't want to free() here.
I'm not sure how to avoid the warning