rbd.py can leave Image object in inconsistent state on failure to construct
Constructing an Image object with bad parameters (say, an nonexistent rbd image name) can leave the
resulting object in an inconsistent state, such that later operations (even unconnected to the
failed Image object) can cause python to segfault.
I think this is due to a bug in Image.__init__, in that it sets self.closed to False before successfully
completing the 'check for string' and rbd_open() operations; this means that anything that calls the
Image.close() will attempt to call rbd_close() with, probably, a NULL pointer. This includes del, which
is probably called on the next Python statement after the failed Image.__init__, leading to the