Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

libceph: fix error handling in ceph_osdc_init()



msgpool_op_reply message pool isn't destroyed if workqueue construction
fails.  Fix it.

Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent 38dbfb59
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2504,9 +2504,12 @@ int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client)
	err = -ENOMEM;
	osdc->notify_wq = create_singlethread_workqueue("ceph-watch-notify");
	if (!osdc->notify_wq)
		goto out_msgpool;
		goto out_msgpool_reply;

	return 0;

out_msgpool_reply:
	ceph_msgpool_destroy(&osdc->msgpool_op_reply);
out_msgpool:
	ceph_msgpool_destroy(&osdc->msgpool_op);
out_mempool: