Hello...

I've had problems with MandrakeUpdate for quite a while now.
Others have reported problems too a while ago. Basically,
it dumps core, more or less at random.

I looked into the source and found a problem related to the
invocation of headerFree. Basically, calling headerFree before
closing the db induces a core dump. I haven't looked into
headerFree and rpmdbClose, but re-arranging the invocations
is a way of (temporarily) fixing MandrakeUpdate.

The patch for MandrakeUpdate-7.2-18mdk is attached.

-- 
Jean Meloche
[EMAIL PROTECTED]
e-gold # 133947
--- MandrakeUpdate.c    Sat Dec 16 22:27:17 2000
+++ DebuggedMandrakeUpdate.c    Sat Dec 16 22:27:09 2000
@@ -786,6 +786,9 @@
           Summary = g_strdup(buf);
           headerGetEntry(h, RPMTAG_DESCRIPTION, NULL, (void **) &buf, NULL);
           Description = g_strdup(buf);
+          rpmdbFreeIterator(iterator);
+          rpmdbClose(db);
+         break;
         }
         headerFree(h);
       }
@@ -803,6 +806,8 @@
       rpmdbFreeIterator(iterator);
 #endif
       rpmdbClose(db);
+      printf("NOT RETURNING!!!\n");
+      fflush(stdout);
     }
   } else
   {
@@ -820,10 +825,9 @@
   }
 #ifndef RPMDBI_PACKAGES
   dbiFreeIndexRecord(matches);
+  rpmdbClose(db);
 #else
-  rpmdbFreeIterator(iterator);
 #endif
-  rpmdbClose(db);
   if (VersionCompare(Version, InstalledVersion)<0)
   {
     row_data *TmpData;

Reply via email to