RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmfi.c rpminstall.c rpm/ system.h

From: Jeff Johnson <jbj@rpm5.org>
Date: Fri 17 Aug 2007 - 20:50:20 CEST
Message-Id: <20070817185020.9BA64348456@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   17-Aug-2007 20:50:20
  Branch: HEAD                             Handle: 2007081719501901

  Modified files:
    rpm                     CHANGES system.h
    rpm/lib                 rpmfi.c rpminstall.c

  Log:
    - repair a minor rpmInstall and major matchpathcon_init() memleaks.

  Summary:
    Revision    Changes     Path
    1.1582      +1  -0      rpm/CHANGES
    2.73        +1  -0      rpm/lib/rpmfi.c
    1.157       +9  -0      rpm/lib/rpminstall.c
    2.84        +1  -0      rpm/system.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1581 -r1.1582 CHANGES
  --- rpm/CHANGES	17 Aug 2007 18:17:57 -0000	1.1581
  +++ rpm/CHANGES	17 Aug 2007 18:50:19 -0000	1.1582
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - jbj: repair a minor rpmInstall and major matchpathcon_init() memleaks.
       - jbj: unbreak --install/--upgrade/--freshen, memleaks checked.
       - jbj: use rpmgi for --install/--upgrade/--freshen. non-functional atm.
       - jbj: add getter/setter for header magic to hide _newmagic construction.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.72 -r2.73 rpmfi.c
  --- rpm/lib/rpmfi.c	9 Aug 2007 18:45:29 -0000	2.72
  +++ rpm/lib/rpmfi.c	17 Aug 2007 18:50:20 -0000	2.73
  @@ -1801,6 +1801,7 @@
       av[ac] = NULL;	/* XXX tag arrays are not NULL terminated. */
   
   exit:
  +    matchpathcon_fini();
       fi = rpmfiFree(fi);
       /*@-branchstate@*/
       if (fcontextp)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpminstall.c
  ============================================================================
  $ cvs diff -u -r1.156 -r1.157 rpminstall.c
  --- rpm/lib/rpminstall.c	17 Aug 2007 18:17:58 -0000	1.156
  +++ rpm/lib/rpminstall.c	17 Aug 2007 18:50:20 -0000	1.157
  @@ -543,6 +543,15 @@
       }
   
   exit:
  +    if (sourceURL != NULL)
  +    for (i = 0; i < numSRPMS; i++)
  +        sourceURL[i] = _free(sourceURL[i]);
  +    sourceURL = _free(sourceURL);
  +
  +    if (!(ia->transFlags & RPMTRANS_FLAG_NOCONTEXTS)) {
  +	matchpathcon_fini();
  +    }
  +
       rpmtsEmpty(ts);
   
       return numFailed;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/system.h
  ============================================================================
  $ cvs diff -u -r2.83 -r2.84 system.h
  --- rpm/system.h	17 Aug 2007 16:04:50 -0000	2.83
  +++ rpm/system.h	17 Aug 2007 18:50:19 -0000	2.84
  @@ -314,6 +314,7 @@
   
   #define matchpathcon_init(_fn)	(-1)
   #define matchpathcon(_fn, _fmode, _s)	(-1)
  +#define	matchpathcon_fini()
   #endif
   
   #if defined(WITH_SELINUX) && defined(__LCLINT__)
  @@ .
Received on Fri Aug 17 20:50:20 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.