RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ depends.c rpmchecksig.c rpmds.c rpmds...

From: Jeff Johnson <jbj@rpm5.org>
Date: Fri 09 Nov 2007 - 22:04:36 CET
Message-Id: <20071109210436.96096348477@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:   09-Nov-2007 22:04:36
  Branch: HEAD                             Handle: 2007110921043501

  Modified files:
    rpm                     CHANGES
    rpm/lib                 depends.c rpmchecksig.c rpmds.c rpmds.h
    rpm/rpmdb               pkgio.c rpmdb.c

  Log:
    - jbj: hmmm, headerGetExtension should not leak memory on failure. hack it.
    - jbj: more memory leak canoodling.

  Summary:
    Revision    Changes     Path
    1.1782      +2  -0      rpm/CHANGES
    1.359       +3  -0      rpm/lib/depends.c
    1.169       +1  -0      rpm/lib/rpmchecksig.c
    2.78        +1  -1      rpm/lib/rpmds.c
    2.61        +3  -0      rpm/lib/rpmds.h
    1.23        +1  -1      rpm/rpmdb/pkgio.c
    1.202       +5  -1      rpm/rpmdb/rpmdb.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1781 -r1.1782 CHANGES
  --- rpm/CHANGES	9 Nov 2007 20:10:59 -0000	1.1781
  +++ rpm/CHANGES	9 Nov 2007 21:04:35 -0000	1.1782
  @@ -1,4 +1,6 @@
   4.5 -> 5.0:
  +    - jbj: hmmm, headerGetExtension should not leak memory on failure. hack it.
  +    - jbj: more memory leak canoodling.
       - jbj: plug a couple of memory leaks.
       - jbj: rearrange the steaming piles of ick into an aesthetic constellation.
       - jbj: squeaky clean SSL memory cleanup. Ick.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.358 -r1.359 depends.c
  --- rpm/lib/depends.c	9 Nov 2007 20:11:00 -0000	1.358
  +++ rpm/lib/depends.c	9 Nov 2007 21:04:35 -0000	1.359
  @@ -562,6 +562,8 @@
       cpuinfoP = rpmdsFree(cpuinfoP);
       getconfP = rpmdsFree(getconfP);
       unameP = rpmdsFree(unameP);
  +    _sysinfo_path = _free(_sysinfo_path);
  +    sysinfo_path = _free(sysinfo_path);
   }
   
   /**
  @@ -900,6 +902,7 @@
   	    sysinfo_path = xstrdup(SYSCONFIGDIR "/sysinfo");
   	}
       }
  +
       if (!rpmioAccess(sysinfo_path, NULL, R_OK)) {
   #ifdef	NOTYET	/* XXX just sysinfo Provides: for now. */
   	rpmTag tagN = (Name[0] == '/' ? RPMTAG_DIRNAMES : RPMTAG_PROVIDENAME);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.168 -r1.169 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c	8 Nov 2007 19:40:40 -0000	1.168
  +++ rpm/lib/rpmchecksig.c	9 Nov 2007 21:04:35 -0000	1.169
  @@ -874,6 +874,7 @@
   	    res++;
   	    goto exit;
   	}
  +	msg = _free(msg);
   }
   
   if (!_nosigh) {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.c
  ============================================================================
  $ cvs diff -u -r2.77 -r2.78 rpmds.c
  --- rpm/lib/rpmds.c	3 Nov 2007 23:44:00 -0000	2.77
  +++ rpm/lib/rpmds.c	9 Nov 2007 21:04:35 -0000	2.78
  @@ -1545,7 +1545,7 @@
   
   #define	_ETC_RPM_SYSINFO	SYSCONFIGDIR "/sysinfo"
   /*@unchecked@*/ /*@observer@*/ /*@owned@*/ /*@relnull@*/
  -static const char *_sysinfo_path = NULL;
  +const char *_sysinfo_path = NULL;
   
   /*@unchecked@*/ /*@observer@*/ /*@relnull@*/
   static const char *_sysinfo_tags[] = {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.h
  ============================================================================
  $ cvs diff -u -r2.60 -r2.61 rpmds.h
  --- rpm/lib/rpmds.h	3 Nov 2007 23:44:00 -0000	2.60
  +++ rpm/lib/rpmds.h	9 Nov 2007 21:04:35 -0000	2.61
  @@ -18,6 +18,9 @@
   extern int _rpmds_debug;
   /*@=exportlocal@*/
   
  +/*@unchecked@*/ /*@observer@*/ /*@owned@*/ /*@relnull@*/
  +extern const char *_sysinfo_path;
  +
   /**
    */
   /*@-exportlocal@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.22 -r1.23 pkgio.c
  --- rpm/rpmdb/pkgio.c	8 Nov 2007 19:40:40 -0000	1.22
  +++ rpm/rpmdb/pkgio.c	9 Nov 2007 21:04:36 -0000	1.23
  @@ -434,7 +434,7 @@
       else
   	l = _free(l);
   	
  -    if (msg != NULL) {
  +    if (msg != NULL && buf[0] != '\0') {
   	buf[sizeof(buf)-1] = '\0';
   	*msg = xstrdup(buf);
       }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.c
  ============================================================================
  $ cvs diff -u -r1.201 -r1.202 rpmdb.c
  --- rpm/rpmdb/rpmdb.c	8 Nov 2007 16:20:13 -0000	1.201
  +++ rpm/rpmdb/rpmdb.c	9 Nov 2007 21:04:36 -0000	1.202
  @@ -2891,8 +2891,12 @@
   		continue;
   		/*@notreached@*/ /*@switchbreak@*/ break;
   	    default:
  -		if (!hge(h, he, 0))
  +		xx = hge(h, he, 0);
  +		if (!xx) {
  +		    /* XXX FIXME: headerGetExtension shouldn't malloc. */
  +		    he->p.ptr = _free(he->p.ptr);
   		    continue;
  +		}
   		/*@switchbreak@*/ break;
   
   	    }
  @@ .
Received on Fri Nov 9 22:04:36 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.