[Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)
Florian Festi
notifications at github.com
Tue Nov 8 10:34:32 UTC 2022
@ffesti commented on this pull request.
> + if (checkForEncoding(pkg->header, 0) != RPMRC_OK) {
+ badenc = 1;
+ }
+ }
+ if (badenc)
+ goto errxit;
+ }
+
+ closeSpec(spec);
+
+exit:
+ return spec;
+
+errxit:
+ if (!secondary)
+ rpmSpecFree(spec);
OK, I was able to at least get rid of the `rpmSpecFree` in `parseSpec` which is just not needed. The API sets some hard limits on what we can do here. While parseSpec is returning NULL on error we can't free the spec when parsing dynamic spec parts as the surrounding code does not expect the spec object to go away at that point.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1485#discussion_r1016441627
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1485/review/1171852884 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20221108/cdcff974/attachment-0001.html>
More information about the Rpm-maint
mailing list