shared/vcp: prevent dereferencing of NULL pointers

util_memdup() will terminate the program if memory
allocation fails.

Found with the SVACE static analysis tool.
1 file changed