aboutsummaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-05-10 06:39:15 +0000
committerUlrich Drepper <drepper@redhat.com>2006-05-10 06:39:15 +0000
commit400cc70af5972a50618702da02d18aee845ce542 (patch)
tree5aec81730804ff70928434f12d9ffa3dc0954c13 /string
parent* nis/nis_defaults.c (searchXYX): New functions. Used by both (diff)
downloadglibc-400cc70af5972a50618702da02d18aee845ce542.tar.gz
glibc-400cc70af5972a50618702da02d18aee845ce542.tar.bz2
glibc-400cc70af5972a50618702da02d18aee845ce542.zip
* 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]
Diffstat (limited to 'string')
-rw-r--r--string/argz-replace.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/string/argz-replace.c b/string/argz-replace.c
index 3c4062488e..1b0eb15fd7 100644
--- a/string/argz-replace.c
+++ b/string/argz-replace.c
@@ -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;
}