2004-07-16 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fvwrite.c (_sfvwrite): For asprintf family calls, if realloc fails, free up buffer as it is no longer used.
This commit is contained in:
parent
e348b39a71
commit
dbfd3394e9
|
@ -1,3 +1,9 @@
|
|||
2004-07-16 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* libc/stdio/fvwrite.c (_sfvwrite): For asprintf family
|
||||
calls, if realloc fails, free up buffer as it is no longer
|
||||
used.
|
||||
|
||||
2004-07-07 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
|
||||
|
||||
* libc/iconv/iconv.tex: Updated to represent recent changes.
|
||||
|
|
|
@ -129,7 +129,11 @@ _DEFUN(__sfvwrite, (fp, uio),
|
|||
fp->_bf._base,
|
||||
curpos + len);
|
||||
if (!ptr)
|
||||
goto err;
|
||||
{
|
||||
/* Free buffer which is no longer used. */
|
||||
_free_r (_REENT, fp->_bf._base);
|
||||
goto err;
|
||||
}
|
||||
fp->_bf._base = ptr;
|
||||
fp->_p = ptr + curpos;
|
||||
fp->_bf._size = curpos + len;
|
||||
|
|
Loading…
Reference in New Issue