mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
erasure-code: do not leak shec instance on failure
If the shec plugin fails to initialize the instance, it must be deleted before returning to the caller, otherwise it will be leaked. Signed-off-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
parent
6ca60061bb
commit
0822922566
@ -59,6 +59,7 @@ public:
|
||||
}
|
||||
int r = interface->init(profile);
|
||||
if (r) {
|
||||
delete interface;
|
||||
return r;
|
||||
}
|
||||
*erasure_code = ErasureCodeInterfaceRef(interface);
|
||||
|
Loading…
Reference in New Issue
Block a user