<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:sbergman@redhat.com" title="Stephan Bergmann <sbergman@redhat.com>"> <span class="fn">Stephan Bergmann</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Use STACK lint tool to clean code ..."
href="https://bugs.freedesktop.org/show_bug.cgi?id=71043">bug 71043</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>sbergman@redhat.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Use STACK lint tool to clean code ..."
href="https://bugs.freedesktop.org/show_bug.cgi?id=71043#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Use STACK lint tool to clean code ..."
href="https://bugs.freedesktop.org/show_bug.cgi?id=71043">bug 71043</a>
from <span class="vcard"><a class="email" href="mailto:sbergman@redhat.com" title="Stephan Bergmann <sbergman@redhat.com>"> <span class="fn">Stephan Bergmann</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=71043#c5">comment #5</a>)
<span class="quote">> Now, what to do in this particular case then is a question of taste, more or
> less.
>
> Personally I think that if a memory allocation (of a small amount of memory)
> fails at this place in the code, which as far as I know is invoked mainly
> (only?) very early when LO is starting, something is very wrong and there is
> no point in even trying to recover gracefully from the memory allocation
> failure. So let __osl_createPipeImpl() be as is and remove the pointless
> checks for NULL return after the calls to it.
>
> But I assume there is an opposite opinion, too, that each and every memory
> allocation should be checked and the code should do its utmost to fail
> gracefully... In that case, the check for memory allocation failure should
> be moved inside __osl_createPipeImpl() right after the call to calloc(), and
> in case of failure, NULL should be returned immediately. Hopefully then the
> return value of __osl_createPipeImpl() is checked in each case.</span >
In this case, where both callers of __osl_createPipeImpl already use "return
NULL" to indicate error, I see no disadvantage in cleanly reporting calloc
failure instead of relying on SIGSEGV doing the right thing.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>