diff --git a/WHATS_NEW b/WHATS_NEW index 9b84b333d..86f8a2f29 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.44 - ==================================== + Fix segfault when invalid field given in reporting commands. Refactor init_lvm() for lvmcmdline and clvmd. Add liblvm interactive test infrastructure to build. Use better random seed value in temp file creation. diff --git a/lib/report/report.c b/lib/report/report.c index 4c164c9b4..a439c80f3 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -1108,7 +1108,7 @@ void *report_init(struct cmd_context *cmd, const char *format, const char *keys, rh = dm_report_init(report_type, _report_types, _fields, format, separator, report_flags, keys, cmd); - if (field_prefixes) + if (rh && field_prefixes) dm_report_set_output_field_name_prefix(rh, "lvm2_"); return rh;