RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpminstall.c rpm/rpmdb/ header.c rpmd...

From: Jeff Johnson <jbj@rpm5.org>
Date: Fri 12 Oct 2007 - 01:50:05 CEST
Message-Id: <20071011235005.5B65D34845F@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:   12-Oct-2007 01:50:05
  Branch: HEAD                             Handle: 2007101200500401

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpminstall.c
    rpm/rpmdb               header.c rpmdb.c

  Log:
    - plug --rebuilddb memory leaks. headerGetExtension() est arrive!

  Summary:
    Revision    Changes     Path
    1.1671      +1  -0      rpm/CHANGES
    1.169       +1  -0      rpm/lib/rpminstall.c
    1.73        +2  -0      rpm/rpmdb/header.c
    1.174       +2  -6      rpm/rpmdb/rpmdb.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1670 -r1.1671 CHANGES
  --- rpm/CHANGES	11 Oct 2007 22:35:35 -0000	1.1670
  +++ rpm/CHANGES	11 Oct 2007 23:50:04 -0000	1.1671
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - jbj: plug --rebuilddb memory leaks. headerGetExtension() est arrive!
       - jbj: fix: set FD_CLOEXEC in Open() and fdDup().
       - jbj: eliminate rpmMessage, rpmlog instead.
       - jbj: finish eliminating rpmError, rpmlog instead.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpminstall.c
  ============================================================================
  $ cvs diff -u -r1.168 -r1.169 rpminstall.c
  --- rpm/lib/rpminstall.c	11 Oct 2007 19:44:22 -0000	1.168
  +++ rpm/lib/rpminstall.c	11 Oct 2007 23:50:04 -0000	1.169
  @@ -460,6 +460,7 @@
   	}
   
   	/* === Add binary package to transaction set. */
  +	/* XXX xstrdup has memory leak. */
   	rc = rpmtsAddInstallElement(ts, h, (fnpyKey)xstrdup(fn),
   			(ia->installInterfaceFlags & INSTALL_UPGRADE) != 0,
   			ia->relocations);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.c
  ============================================================================
  $ cvs diff -u -r1.72 -r1.73 header.c
  --- rpm/rpmdb/header.c	11 Oct 2007 16:09:36 -0000	1.72
  +++ rpm/rpmdb/header.c	11 Oct 2007 23:50:05 -0000	1.73
  @@ -1864,6 +1864,8 @@
       case RPM_OPENPGP_TYPE:
       case RPM_ASN1_TYPE:
       case RPM_BIN_TYPE:
  +	he->freeData = 1;	/* XXX RPM_BIN_TYPE is malloc'd */
  +	/*@fallthrough@*/
       case RPM_CHAR_TYPE:
       case RPM_INT8_TYPE:
   	nb = he_c * sizeof(*he_p.i8p);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.c
  ============================================================================
  $ cvs diff -u -r1.173 -r1.174 rpmdb.c
  --- rpm/rpmdb/rpmdb.c	11 Oct 2007 19:44:24 -0000	1.173
  +++ rpm/rpmdb/rpmdb.c	11 Oct 2007 23:50:05 -0000	1.174
  @@ -3314,11 +3314,6 @@
   		xx = hge(h, he->tag, he->t, he->p, he->c);
   		xx = hge(h, RPMTAG_REQUIREFLAGS, NULL, &requireFlags, NULL);
   		/*@switchbreak@*/ break;
  -#ifdef	DYING
  -	    case RPMTAG_NVRA:	/* XXX compound header extension. */
  -		xx = headerGetExtension(h, he->tag, he->t, he->p, he->c);
  -		/*@switchbreak@*/ break;
  -#endif
   	    default:
   		xx = hge(h, he->tag, he->t, he->p, he->c);
   		/*@switchbreak@*/ break;
  @@ -3525,6 +3520,7 @@
   	    he_p.ptr = _free(he_p.ptr);
   	    he_c = 0;
   	    bin = _free(bin);
  +	    requireFlags = _free(requireFlags);
   	}
   
   	rec = _free(rec);
  @@ -3809,7 +3805,7 @@
   	    }
   bottom:
   	    ofn = _free(ofn);
  -	    nfn = _free(ofn);
  +	    nfn = _free(nfn);
   	}
   
   	ofn = rpmGetPath(prefix, olddbpath, "/", "__db.000", NULL);
  @@ .
Received on Fri Oct 12 01:50:05 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.