1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmetad: check for allocation fail

Coverity: missing check for root != NULL as this pointer is
later dereferenced in add_last_node().
This commit is contained in:
Zdenek Kabelac 2015-11-08 19:38:19 +01:00
parent 297d6773af
commit 91bde0f4a1
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.135 -
====================================
Add missing test for failing node allocation in lvmetad.
Correct configure messages when enabling/disabling lvmlockd.
Version 2.02.134 - 9th November 2015

View File

@ -504,7 +504,9 @@ static response pv_list(lvmetad_state *s, request r)
return res; /* FIXME error reporting */
/* The response field */
res.cft->root = make_text_node(res.cft, "response", "OK", NULL, NULL);
if (!(res.cft->root = make_text_node(res.cft, "response", "OK", NULL, NULL)))
return res; /* FIXME doomed */
cn_pvs = make_config_node(res.cft, "physical_volumes", NULL, res.cft->root);
lock_pvid_to_pvmeta(s);