[Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)
Panu Matilainen
notifications at github.com
Tue Nov 8 07:14:57 UTC 2022
@pmatilai 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);
Of course it needs a spec pointer. The point here is to avoid two paths of error cleanup in different functions which is just the kind of murky environment that all manner of unpleasant creatures thrive. We can't fix everything that is crazy in there, but never ever make bad code worse. Find a way, I'm sure there is one or more. My musings above were just ways I'd look into resolving it, there may be others/better ones.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1485#discussion_r1016217062
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1485/review/1171539225 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20221107/76b577ce/attachment.html>
More information about the Rpm-maint
mailing list