__wcsconv(): free(convbuf) before returning NULL
This commit is contained in:
parent
cfb316d8d0
commit
c0bef0ac8a
@ -384,9 +384,11 @@ __wcsconv(wchar_t *wcsarg, int prec)
|
||||
break;
|
||||
mbp += clen;
|
||||
}
|
||||
*mbp = '\0';
|
||||
if (clen == (size_t)-1)
|
||||
if (clen == (size_t)-1) {
|
||||
free(convbuf);
|
||||
return (NULL);
|
||||
}
|
||||
*mbp = '\0';
|
||||
|
||||
return (convbuf);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user