@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/1171539...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint