* locale/programs/repertoire.c (repertoire_read): Always free
authorUlrich Drepper <drepper@redhat.com>
Sat, 13 Oct 2007 05:26:27 +0000 (05:26 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 13 Oct 2007 05:26:27 +0000 (05:26 +0000)
memory for repertoire file name [Coverity CID 270].

ChangeLog
locale/programs/repertoire.c

index c3a9a30..6b89367 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-10-12  Ulrich Drepper  <drepper@redhat.com>
 
+       * locale/programs/repertoire.c (repertoire_read): Always free
+       memory for repertoire file name [Coverity CID 270].
+
        * elf/cache.c (save_aux_cache): Free memory allocated for
        temporary file name [Coverity CID 267].
 
index cc83374..366580e 100644 (file)
@@ -113,8 +113,7 @@ repertoire_read (const char *filename)
                      filename);
              repfile = lr_open (buf, repertoiremap_hash);
 
-             if (repfile == NULL)
-               free (buf);
+             free (buf);
            }
        }