mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
cleanup: reuse existing code for free path
This commit is contained in:
parent
9668427fe8
commit
a8a958cc04
@ -964,12 +964,8 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
|
|||||||
r = 1;
|
r = 1;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (!r) {
|
if (!r)
|
||||||
free(fidtc->write_buf);
|
free_text_fidtc(vg);
|
||||||
fidtc->write_buf = NULL;
|
|
||||||
fidtc->write_buf_size = 0;
|
|
||||||
fidtc->new_metadata_size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@ -1154,12 +1150,8 @@ static int _vg_commit_raw_rlocn(struct format_instance *fid,
|
|||||||
r = 1;
|
r = 1;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (!precommit && !fidtc->preserve) {
|
if (!precommit && !fidtc->preserve)
|
||||||
free(fidtc->write_buf);
|
free_text_fidtc(vg);
|
||||||
fidtc->write_buf = NULL;
|
|
||||||
fidtc->write_buf_size = 0;
|
|
||||||
fidtc->new_metadata_size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user