Commit fbba11b3 authored by Ilya Dryomov's avatar Ilya Dryomov
Browse files

rbd: do not leak image_id in rbd_dev_v2_parent_info()



image_id is leaked if the parent happens to have been recorded already.
Fix it.

Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
parent 494d77bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4072,6 +4072,8 @@ static int rbd_dev_v2_parent_info(struct rbd_device *rbd_dev)
		parent_spec->snap_id = snap_id;
		rbd_dev->parent_spec = parent_spec;
		parent_spec = NULL;	/* rbd_dev now owns this */
	} else {
		kfree(image_id);
	}

	/*