test/objectstore/store_test.cc: prefer ++operators for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
MDCache.h: init 'umaster::safe' in constructor

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
MDCache.cc: init 'umaster::ls' with NULL in contructor

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test/libradosstriper/striping.cc: fix potential memory leak

Fix for:
[src/test/libradosstriper/striping.cc:138]: (error) Allocation with
 getObjName, stat doesn't release it

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_rados.h: use static_cast instead of c-style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
RadosStriperImpl.cc: catch exception by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
libcephfs/test.cc: fix use after free

Don't call ceph_shutdown() after ceph_release().

CID 1219651 (#1 of 1): Use after free (USE_AFTER_FREE)
  17. deref_arg: Calling ceph_shutdown dereferences freed
  pointer cmount.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
scratchtool.c: fix resource leak

CID 1219612 (#1 - 3): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable iter going out of scope leaks the
 storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
scratchtool.c: fix resource leak and error handling

Check the result of rados_ioctx_create()before using io_ctx.
Free io_ctx where needed. Fix messages at the end of testrados().

CID 1219613 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable io_ctx going out of scope leaks the
 storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
mount.ceph.c: fix strdup related memory leak

CID 1219611 (#1 - 5): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable saw_name going out of scope
 leaks the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
common/fd.cc: fix possible out-of-bounds write

Read max 'sizeof(target) - 1' to not write out of bound
later on the 'target[r] = 0;' call in case we read the
full PATH_MAX.

CID 1128416 (#1 of 1): Out-of-bounds write (OVERRUN)
 overrun-local: Overrunning array target of 4096 bytes
 at byte offset 4096 using index r (which evaluates to 4096).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
scratchtool.c: cleanup do_rados_getxattrs()

Cleanup error path to reduce code duplication.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge pull request #2035 from ceph/wip-da-SCA-20140623

Fix for SCA and CID issues

Reviewed-by: Sage Weil <sage@redhat.com>