RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   16-Jan-2008 15:25:56
  Branch: HEAD                             Handle: 2008011614255500

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpmfi.c

  Log:
    - fix: plug memory leak with digest algos array.
    - fix: --relocate no longer needs to copy dirIndexes data.

  Summary:
    Revision    Changes     Path
    1.2073      +2  -0      rpm/CHANGES
    2.110       +1  -6      rpm/lib/rpmfi.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2072 -r1.2073 CHANGES
  --- rpm/CHANGES       16 Jan 2008 01:18:37 -0000      1.2072
  +++ rpm/CHANGES       16 Jan 2008 14:25:55 -0000      1.2073
  @@ -1,4 +1,6 @@
   5.0.0 -> 5.1a1:
  +    - jbj: fix: plug memory leak with digest algos array.
  +    - jbj: fix: --relocate no longer needs to copy dirIndexes data.
       - proyvind: make perl install directory overriddable from configure as 
an argument (--with-perl=vendor/site)
       - proyvind: fix install location of man pages for perl bindings
       - proyvind: fix install location of pkgconfig & python bindings (lib64 
fix)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.109 -r2.110 rpmfi.c
  --- rpm/lib/rpmfi.c   19 Dec 2007 03:50:40 -0000      2.109
  +++ rpm/lib/rpmfi.c   16 Jan 2008 14:25:55 -0000      2.110
  @@ -696,7 +696,6 @@
       const char ** baseNames;
       const char ** dirNames;
       uint32_t * dirIndexes;
  -    uint32_t * newDirIndexes;
       uint32_t fileCount;
       uint32_t dirCount;
       uint32_t mydColor = rpmExpandNumeric("%{?_autorelocate_dcolor}");
  @@ -901,10 +900,6 @@
       dColors = alloca(dirCount * sizeof(*dColors));
       memset(dColors, 0, dirCount * sizeof(*dColors));
   
  -    newDirIndexes = alloca(sizeof(*newDirIndexes) * fileCount);
  -    memcpy(newDirIndexes, dirIndexes, sizeof(*newDirIndexes) * fileCount);
  -    dirIndexes = newDirIndexes;
  -
       /*
        * For all relocations, we go through sorted file/relocation lists 
        * backwards so that /usr/local relocations take precedence over /usr 
  @@ -1391,7 +1386,7 @@
        case PGPHASHALGO_SHA512:        fi->digestlen = 512/8;  break;
        case PGPHASHALGO_CRC32:         fi->digestlen = 32/8;   break;
        }
  -     fi->fdigestalgos = NULL;
  +     fi->fdigestalgos = _free(fi->fdigestalgos);
       }
   
       _fdupedata(h, RPMTAG_FILEDIGESTS, fi->fdigests);
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to