1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Check result of export_vg_to_buffer

and avoid usage of failed buffer.
This commit is contained in:
Zdenek Kabelac 2012-02-28 11:09:06 +00:00
parent 22266ea325
commit c0d7975bb2

6
lib/cache/lvmetad.c vendored
View File

@ -518,7 +518,11 @@ int lvmetad_pv_found(struct id pvid, struct device *device, const struct format_
* formatted and has no conflicting keys with the rest of the
* request.
*/
export_vg_to_buffer(vg, &buf);
if (!export_vg_to_buffer(vg, &buf)) {
dm_free(pvmeta);
return_0;
}
reply = daemon_send_simple(_lvmetad,
"pv_found",
"pvmeta = %b", pvmeta,