mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
* io/ftw.c (open_dir_stream): Return right away if REALLOC fails.
[Coverity CID 229, 230] * argp/argp-help.c (hol_entry_help): Handle STATE==NULL in ARG and DGETTEXT calls. (hol_help): Likewise. [Coverity CID 226, 227] * string/argz-replace.c (__argz_replace): Unconditionally call free on SRC. [Coverity CID 225] * nis/nis_creategroup.c (nis_creategroup): No need to duplicate the return value of __nis_default_owner and __nis_default_group, it has been especially allocated. [Coverity CID 224]
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* String replacement in an argz vector
|
||||
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>
|
||||
|
||||
@ -121,8 +121,7 @@ __argz_replace (char **argz, size_t *argz_len, const char *str, const char *with
|
||||
if (! delayed_copy)
|
||||
/* We never found any instances of str. */
|
||||
{
|
||||
if (src)
|
||||
free (src);
|
||||
free (src);
|
||||
*argz = dst;
|
||||
*argz_len = dst_len;
|
||||
}
|
||||
|
Reference in New Issue
Block a user