When compiling with -fanalyzer compiler option, the compiler was
warning that the memory pointed to by dp was leaked. The following
change is a simplification and adds more defensive programming by
ensuring dp is not dangling after the memory that it pointed to
is assigned to the array. The warning in this case was incorrect,
but the changes do simplify and improve.
When compiling with
-fanalyzer
compiler option, the compiler was warning that the memory pointed to by dp was leaked. The following change is a simplification and adds more defensive programming by ensuring dp is not dangling after the memory that it pointed to is assigned to the array. The warning in this case was incorrect, but the changes do simplify and improve.