master - format-text: check for _text_create_text_instance
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ff5612c0c3208276763348e9f9afa9a09096fbe1 Commit: ff5612c0c3208276763348e9f9afa9a09096fbe1 Parent: 740ab81d03b1286096d9f8b35be15d54493db52f Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Dec 14 21:34:28 2012 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Sat Dec 15 17:23:23 2012 +0100
format-text: check for _text_create_text_instance
Test if 'fid' creation failed and report stack trace, break the loop and do not pass NULL fid further.
--- WHATS_NEW | 1 + lib/format_text/format-text.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Add check for created fid in _scan_file. Log output also to syslog when abort_on_internal_error is set. Add LV snapshot support to liblvm and python-lvm. Avoid a global lock in pvs when lvmetad is in use.
lib/format_text/format-text.c +4 -1
@@ -1089,7 +1089,10 @@ static int _scan_file(const struct format_type *fmt, const char *vgname)/* FIXME: Check this fid is OK! */ fic.type =FMT_INSTANCE_PRIVATE_MDAS ; fic.context.private =NULL ; - fid =_text_create_text_instance (fmt, &fic); +if (!(fid =_text_create_text_instance (fmt, &fic))) { + stack; +break ; + }if ((vg =_vg_read_file_name (fid, scanned_vgname, path))) {/* FIXME Store creation host in vg */