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

  Server: rpm5.org                         Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs                       Email:  pkarl...@rpm5.org
  Module: rpm                              Date:   12-May-2009 21:17:53
  Branch: HEAD                             Handle: 2009051219175300

  Modified files:
    rpm/lib                 rpmrc.c

  Log:
    leak a bit less memory in rpmCpuinfo()..

  Summary:
    Revision    Changes     Path
    2.282       +5  -2      rpm/lib/rpmrc.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrc.c
  ============================================================================
  $ cvs diff -u -r2.281 -r2.282 rpmrc.c
  --- rpm/lib/rpmrc.c   12 May 2009 14:48:27 -0000      2.281
  +++ rpm/lib/rpmrc.c   12 May 2009 19:17:53 -0000      2.282
  @@ -538,6 +538,8 @@
       Fread(yaml, 1, st.st_size, fd);
       Fclose(fd);
   
  +    /* XXX: Probably not right..? */
  +    cpuinfo = rpmdsSingle(RPMTAG_PROVIDENAME, "", "", RPMSENSE_PROBE);
       xx = rpmdsCpuinfo(&cpuinfo, NULL);
   
       cpuinfoYaml = rpmSyckLoad(yaml);
  @@ -611,9 +613,10 @@
   
       cpuinfoYaml = rpmSyckFree(cpuinfoYaml);
   
  -    xx = mireAppend(RPMMIRE_REGEX, 0, "noarch", NULL, &mi_re, &mi_nre);
  +    (void)rpmdsFree(cpuinfo);
  +    cpuinfo = NULL;
   
  -    cpuinfo = rpmdsFree(cpuinfo);
  +    xx = mireAppend(RPMMIRE_REGEX, 0, "noarch", NULL, &mi_re, &mi_nre);
   
       cpu = mi_re[0].pattern;
       if(cpu != NULL)
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to