<div dir="ltr">On Fri, Feb 1, 2013 at 3:45 PM, Juan Lang <span dir="ltr"><<a href="mailto:juan.lang@gmail.com" target="_blank">juan.lang@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Marcus,<div><br></div><div><pre style="white-space:pre-wrap;word-wrap:break-word">-            add_oid_to_usage(usage, ptr);
+            usage = add_oid_to_usage(usage, ptr);</pre><pre style="white-space:pre-wrap;word-wrap:break-word">This looks fine, but would you mind making the same change on line 337?</pre></div></div></blockquote><div style>
Actually, perhaps I hit sent too early. If this memory allocation fails, which is the only situation under which add_oid_to_usage doesn't just return its first parameter, it'll immediately crash on the next invocation with a NULL pointer dereference.</div>
<div style><br></div><div style>I'm not sure it's worth all the trouble in an out of memory situation. Perhaps just remove the return value and let the caller crash.</div><div style><br></div><div style>Thanks again,</div>
<div style>--Juan</div></div></div></div>