From 400cc70af5972a50618702da02d18aee845ce542 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 10 May 2006 06:39:15 +0000 Subject: * 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] --- string/argz-replace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'string') 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 @@ -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; } -- cgit v1.2.3-70-g09d2