50b343e068
Do not memleak "copy" in case of an error.
Do not use "sizeof(converted)" in snprintf(), since "converted" is a
"char *" (luckily, 8 >= sizeof(char *)). Also, remove "sizeof(char)"
which is guaranteed to be 1 by the C standard, and replace 8 with 12,
which is enough to hold any stringified int and does not consume more
memory (in both cases, the glibc malloc()ates a minimum-sized chunk).
---------------------------- adapted for newlib branch
. no longer in library, logic now found in lib/signals.c
. craig already addressed "copy" memleak in commit beloww
Reference(s):
commit
|
||
---|---|---|
.. | ||
.gitignore | ||
fileutils.c | ||
procio.3 | ||
procio.c | ||
signals.c | ||
strutils.c | ||
strverscmp.c | ||
test_fileutils.c | ||
test_process.c | ||
test_strtod_nol.c | ||
test_strutils.c |