Fix up clang warnings in perf_event_open.c

I was slightly off, the problem turned out to be if we fail at fopen()
we never got to the fscanf(), but we'd then still call parse_format()
with an uninitialized format_value.  So good catch by llvm.

The following should fix things.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Add MRT_ADD_MFC_PROXY and MRT_DEL_MFC_PROXY for older kernels.

This patch fixes these build errors on kernels 3.8 and older.

  CC	net/ip_setsockopt.o
net/ip_setsockopt.c:32:22: error: ‘MRT_ADD_MFC_PROXY’ undeclared here (not in a function)
net/ip_setsockopt.c:32:41: error: ‘MRT_DEL_MFC_PROXY’ undeclared here (not in a function)
make: *** [net/ip_setsockopt.o] Error 1

Signed-off-by: Vinson Lee <vlee@twitter.com>
perf_event_open: initialize chars

Just in case if they get used like in Coverity CID 1042349 and 1042348.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
perf_event_open.c: close dir's on exit paths

Don't leaky fd's so much. Fixes Coverity CID's 1042345, 1042346 and 1042347.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
sockets.c: don't leak cachefile on return paths

Fixes Coverity CID's 1042341 and 1042342.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
maps.c: only close() if fd is valid

Fixes Coverity CID 1042340.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>