remove_names(): fix potenial null pointer dereference

The code to strip the path from the 'content' is incorrect,
since in case '/' is not found p becomes null.

One way to fix it would be to add

	else
		p = content;

Instead, let's just use the GNU version of basename which does
exactly what we want.

Note this patch relies on _GNU_SOURCE to be defined during
compilation, and string.h to be included.

Found by coverity, CID 996855.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed