const void * key);
static void skipFiles(struct fileInfo * fi, int noDocs);
+static void freeFi(struct fileInfo *fi)
+{
+ if (fi->h) {
+ headerFree(fi->h); fi->h = NULL;
+ }
+ if (fi->actions) {
+ free(fi->actions); fi->actions = NULL;
+ }
+ if (fi->replaced) {
+ free(fi->replaced); fi->replaced = NULL;
+ }
+ if (fi->fl) {
+ free(fi->fl); fi->fl = NULL;
+ }
+ if (fi->flinks) {
+ free(fi->flinks); fi->flinks = NULL;
+ }
+ if (fi->fmd5s) {
+ free(fi->fmd5s); fi->fmd5s = NULL;
+ }
+}
+
+static void freeFl(rpmTransactionSet ts, struct fileInfo *flList)
+{
+ struct availableList * al = &ts->addedPackages;
+ struct availablePackage * alp;
+ struct fileInfo *fi;
+ int i;
+
+ for (alp = al->list, fi = flList; (alp - al->list) < al->size;
+ alp++, fi++) {
+ freeFi(fi);
+ }
+
+ for (i = 0; i < ts->numRemovedPackages; i++, fi++) {
+ freeFi(fi);
+ }
+}
+
#define XSTRCMP(a, b) ((!(a) && !(b)) || ((a) && (b) && !strcmp((a), (b))))
#define NOTIFY(_x) if (notify) notify _x
if (headerGetEntry(h, RPMTAG_FILENAMES, NULL, NULL,
&fileCount))
totalFileCount += fileCount;
+ headerFree(h); /* XXX ==> LEAK */
}
NOTIFY((h, RPMCALLBACK_TRANS_PROGRESS, i, ts->numRemovedPackages,
(void *) &fi->fflags, NULL);
headerGetEntryMinMemory(fi->h, RPMTAG_FILEMD5S, NULL,
(void *) &fi->fmd5s, NULL);
+
+ fi->flinks = NULL; /* XXX FIXME W2DO? */
+
headerGetEntryMinMemory(fi->h, RPMTAG_FILEMODES, NULL,
(void *) &fi->fmodes, NULL);
headerGetEntryMinMemory(fi->h, RPMTAG_FILESTATES, NULL,
for (alp = al->list, fi = flList; (alp - al->list) < al->size;
alp++, fi++) {
if (fi->fc) {
- free(fi->fl);
+ free(fi->fl); fi->fl = NULL;
if (fi->type == ADDED) {
- free(fi->fmd5s);
- free(fi->flinks);
+ free(fi->fmd5s); fi->fmd5s = NULL;
+ free(fi->flinks); fi->flinks = NULL;
}
}
}
for (alp = al->list, fi = flList; (alp - al->list) < al->size;
alp++, fi++) {
- if (fi->fc) {
+ if (fi->fc)
headerFree(hdrs[alp - al->list]);
- free(fi->actions);
- fi->actions = NULL;
- }
-/* XXX FIXME: This smells like a memory leak. */
- if (fi->actions) {
- free(fi->actions);
- fi->actions = NULL;
- }
+ freeFi(fi); /* XXX ==> LEAK */
}
NOTIFY((NULL, RPMCALLBACK_TRANS_STOP, 8, al->size, NULL, notifyData));
+ freeFl(ts, flList); /* XXX ==> LEAK */
return al->size + ts->numRemovedPackages;
}
headerFree(hdrs[alp - al->list]);
-/* XXX FIXME: This smells like a memory leak. */
- if (fi->actions) {
- free(fi->actions);
- fi->actions = NULL;
- }
-
-/* XXX FIXME: This smells like a memory leak. */
- if (fi->replaced) {
- free(fi->replaced);
- fi->replaced = NULL;
- }
-
if (!alp->fd && fd)
notify(fi->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0, alp->key,
notifyData);
+
+ freeFi(fi); /* XXX ==> LEAK */
+
}
NOTIFY((NULL, RPMCALLBACK_TRANS_STOP, 9, al->size, NULL, notifyData));
ourrc++;
-/* XXX FIXME: This smells like a memory leak. */
- if (fi->actions) {
- free(fi->actions);
- fi->actions = NULL;
- }
-/* XXX FIXME: This smells like a memory leak. */
- if (fi->replaced) {
- free(fi->replaced);
- fi->replaced = NULL;
- }
+ freeFi(fi); /* XXX ==> LEAK */
+
}
NOTIFY((NULL, RPMCALLBACK_UNINST_STOP, 0, ts->numRemovedPackages,
NULL, notifyData));
+ freeFl(ts, flList); /* XXX ==> LEAK */
+
if (ourrc)
return -1;
else
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-02-24 23:55-0500\n"
+"POT-Creation-Date: 1999-02-28 13:34-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Password for %s@%s: "
msgstr ""
-#: ../url.c:145 ../url.c:167
+#: ../url.c:146 ../url.c:168
#, c-format
msgid "error: %sport must be a number\n"
msgstr ""
-#: ../url.c:249
+#: ../url.c:250
msgid "url port must be a number\n"
msgstr ""
-#: ../url.c:285
+#: ../url.c:286
#, c-format
msgid "logging into %s as %s, pw %s\n"
msgstr ""
-#: ../lib/rpmdb.c:168 ../url.c:396
+#: ../lib/rpmdb.c:168 ../url.c:397
#, c-format
msgid "failed to open %s\n"
msgstr ""
-#: ../url.c:411
+#: ../url.c:412
#, c-format
msgid "failed to create %s\n"
msgstr ""
msgid "Too many args in default line at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:624
+#: ../lib/rpmrc.c:627
#, c-format
msgid "Cannot expand %s"
msgstr ""
-#: ../lib/rpmrc.c:639
+#: ../lib/rpmrc.c:642
#, c-format
msgid "Unable to open %s for reading: %s."
msgstr ""
-#: ../lib/rpmrc.c:673
+#: ../lib/rpmrc.c:676
#, c-format
msgid "Failed to read %s: %s."
msgstr ""
-#: ../lib/rpmrc.c:704
+#: ../lib/rpmrc.c:707
#, c-format
msgid "missing ':' at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:720 ../lib/rpmrc.c:768
+#: ../lib/rpmrc.c:723 ../lib/rpmrc.c:771
#, c-format
msgid "missing argument for %s at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:734
+#: ../lib/rpmrc.c:737
#, c-format
msgid "expansion failed at %s:d \"%s\""
msgstr ""
-#: ../lib/rpmrc.c:740
+#: ../lib/rpmrc.c:743
#, c-format
msgid "cannot open %s at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:758
+#: ../lib/rpmrc.c:761
#, c-format
msgid "missing architecture for %s at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:825
+#: ../lib/rpmrc.c:828
#, c-format
msgid "bad option '%s' at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:1183
+#: ../lib/rpmrc.c:1186
#, c-format
msgid "Unknown system: %s\n"
msgstr ""
-#: ../lib/rpmrc.c:1184
+#: ../lib/rpmrc.c:1187
msgid "Please contact rpm-list@redhat.com\n"
msgstr ""
msgid "Invalid signature spec in rc file"
msgstr ""
-#: ../lib/transaction.c:662
+#: ../lib/transaction.c:695
#, c-format
msgid "relocating %s to %s\n"
msgstr ""
-#: ../lib/transaction.c:668
+#: ../lib/transaction.c:701
#, c-format
msgid "excluding %s\n"
msgstr ""
-#: ../lib/transaction.c:756
+#: ../lib/transaction.c:789
#, c-format
msgid "%s skipped due to missingok flag\n"
msgstr ""