Fix use after free in configfs_handle_target()

Accessing "tgt->name" after freeing "tgt" is invalid.
Reported by Coverity Scan.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Fix erroneous memset()

This is a common mistake: invert the constant byte and the size of the
memory area.
Reported by Coverity Scan.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Check the return value of read()

Reported by Coverity Scan.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
NULL terminate the portal IP address string

Reported by Coverity Scan.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>