<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<p style="color: #777777;">
<a href="https://gitlab.com/rockdaboot">Tim Rühsen</a>
commented on a
<a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_791505299">discussion</a>:
</p>
<div style="">
<p dir="auto">There are a bunch of other 'pros' (in the list above) that have nothing to do with performance optimzations (it sounds like you are referring to perf opt only).</p>
<p dir="auto">As it is hard to get test coverage for every possibly error case, I'd try to avoid heap allocations in C/C++ as much as possible. That reduces future maintenance, especially when thinking of future code changes or extensions.</p>
<p dir="auto">We could consider keeping the dirname and the basename separate, so that we could use openat (at least on POSIX systems). Hm, I think this requires some kind of redesign.</p>
<p dir="auto">BTW, looking at <code>gnutls_x509_trust_list_add_trust_file()</code>, there is a memory leak if both <code>ca_file</code> and <code>crl_file</code> are set but <code>read_file(crl_file, ...)</code> returns NULL. Less heap allocations means less memory faults - that's why I am a bit hesitant regarding this PR.</p>
<p dir="auto">But please feel free to merge. We can discuss any redesign at a later time. I didn't want to "capture" this PR :-)</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_791505299">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/-/sent_notifications/a843ffd826eee6b88b7216a0a2210b22/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_791505299"}}</script>
</p>
</div>
</body>
</html>