<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 16, 2016 at 10:10 AM, Ken Martin <span dir="ltr"><<a href="mailto:ken.martin@kitware.com" target="_blank">ken.martin@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_quote">894           in1 = src1DA->GetComponent(srcTuple1, c);<br>
>>>     CID 1355146:  Null pointer dereferences  (NULL_RETURNS)<br>
>>>     Dereferencing a pointer that might be null "src2DA" when calling "GetComponent". (The dereference happens because this is a virtual function call.)<br></div></div></div></blockquote><div><br></div><div>This actually has a NULL check, but there's a missing return statement. I'll fix this up.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_quote">*** CID 1355147:  Resource leaks  (RESOURCE_LEAK)<br>
/home/nschloe/software/vtk/source-upstream/IO/XML/Testing/Cxx/TestXMLWriterWithDataArrayFallback.cxx: 32 in TestXMLWriterWithDataArrayFallback(int, char **)()<br>
26     #include "vtkXMLImageDataWriter.h"<br>
27<br>
28     #include <string><br>
29<br>
30     int TestXMLWriterWithDataArrayFallback(int argc, char *argv[])<br>
31     {<br>
>>>     CID 1355147:  Resource leaks  (RESOURCE_LEAK)<br>
>>>     Failing to save or free storage allocated by "vtkTestUtilities::GetArgOrEnvOrDefault("-T", argc, argv, "VTK_TEMP_DIR", "Testing/Temporary")" leaks it.<br>
32       std::string temp_dir = std::string(vtkTestUtilities::GetArgOrEnvOrDefault(<br>
33                                            "-T", argc, argv, "VTK_TEMP_DIR",<br>
34                                            "Testing/Temporary"));<br></div></div></div></blockquote><div><br></div><div>Pinging TJ -- I'm guessing that the string returned from vtkTestUtilities::GetArgOrEnvOrDefault needs to be deleted explicitly by the caller.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_quote">
** CID 1355148:  Null pointer dereferences  (REVERSE_INULL)<br>
/home/nschloe/software/vtk/source-upstream/Common/Core/vtkDataArray.cxx: 1310 in vtkDataArray::CreateDataArray(int)()<br>
<br>
<br>
________________________________________________________________________________________________________<br>
*** CID 1355148:  Null pointer dereferences  (REVERSE_INULL)<br>
/home/nschloe/software/vtk/source-upstream/Common/Core/vtkDataArray.cxx: 1310 in vtkDataArray::CreateDataArray(int)()<br>
1304<br>
1305     //----------------------------------------------------------------------------<br>
1306     vtkDataArray* vtkDataArray::CreateDataArray(int dataType)<br>
1307     {<br>
1308       vtkAbstractArray* aa = vtkAbstractArray::CreateArray(dataType);<br>
1309       vtkDataArray* da = vtkDataArray::FastDownCast(aa);<br>
>>>     CID 1355148:  Null pointer dereferences  (REVERSE_INULL)<br>
>>>     Null-checking "aa" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.<br>
1310       if (!da && aa)<br>
1311         {<br>
1312         // Requested array is not a vtkDataArray. Delete the allocated array.<br>
1313         aa->Delete();<br>
1314         }<br>
1315       return da;</div></div></div></blockquote><div><br></div><div>This has been fixed since the coverty scan last ran -- FastDownCast will NULL check its argument after d97bea99f (just merged last week).</div><div><br></div><div>Dave</div><span style="font-family:monospace"><br></span></div></div></div>