librbd: fix possible use-after-free

(of the pointer)

CID 966634 (#1 of 1): Use after free (USE_AFTER_FREE)
2. use_after_free: Using freed pointer "ictx".

Signed-off-by: Sage Weil <sage@inktank.com>
rbd: fix buffer leak in do_import

CID 1019580 (#2 of 2): Resource leak (RESOURCE_LEAK)
10. leaked_storage: Variable "p" going out of scope leaks the storage it points to.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: init test_ops_hook

CID 1019628 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member "test_ops_hook" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: initialize OSDService::next_notif_id

CID 1019627 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member "next_notif_id" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>