CLEANUP: chunk: adding NULL check to chunk_dup allocation.

Avoiding harmful memcpy call if the allocation failed.
Resetting the size which avoids further harmful freeing
invalid pointer. Closer to the comment behavior description.
1 file changed