moved dbiFreeIndexRecord() to be more appropriate (i.e. not segv)
authorewt <devnull@localhost>
Thu, 30 Jan 1997 20:03:39 +0000 (20:03 +0000)
committerewt <devnull@localhost>
Thu, 30 Jan 1997 20:03:39 +0000 (20:03 +0000)
CVS patchset: 1387
CVS date: 1997/01/30 20:03:39

lib/rpmdb.c

index 8a916a0..1dc87b4 100644 (file)
@@ -292,6 +292,8 @@ static void removeIndexEntry(dbiIndex * dbi, char * key, dbiIndexRecord rec,
            dbiUpdateIndex(dbi, key, &matches);
               /* errors from above will be reported from dbindex.c */
        }
+
+       dbiFreeIndexRecord(matches);
        break;
       case 1:
        if (!tolerant) 
@@ -300,8 +302,6 @@ static void removeIndexEntry(dbiIndex * dbi, char * key, dbiIndexRecord rec,
       case 2:
        break;   /* error message already generated from dbindex.c */
     }
-
-    dbiFreeIndexRecord(matches);
 }
 
 int rpmdbRemove(rpmdb db, unsigned int offset, int tolerant) {