mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Initialize pool object for each row
Fix assert abort of dmsetup (when compiled with pool debug) dmsetup splitname --nameprefixes --noheadings --rows gvg-a2 Move pool begin in the inner loop - otherwise it would using already 'ended' pool object.
This commit is contained in:
parent
67199cac4f
commit
4b79aeb0ea
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.62 -
|
Version 1.02.62 -
|
||||||
===================================
|
===================================
|
||||||
|
Initialize pool object for each row in _output_as_rows().
|
||||||
|
|
||||||
Version 1.02.61 - 10th January 2011
|
Version 1.02.61 - 10th January 2011
|
||||||
===================================
|
===================================
|
||||||
|
@ -1006,11 +1006,6 @@ static int _output_as_rows(struct dm_report *rh)
|
|||||||
struct dm_report_field *field;
|
struct dm_report_field *field;
|
||||||
struct row *row;
|
struct row *row;
|
||||||
|
|
||||||
if (!dm_pool_begin_object(rh->mem, 512)) {
|
|
||||||
log_error("dm_report: Unable to allocate output line");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dm_list_iterate_items(fp, &rh->field_props) {
|
dm_list_iterate_items(fp, &rh->field_props) {
|
||||||
if (fp->flags & FLD_HIDDEN) {
|
if (fp->flags & FLD_HIDDEN) {
|
||||||
dm_list_iterate_items(row, &rh->rows) {
|
dm_list_iterate_items(row, &rh->rows) {
|
||||||
@ -1020,6 +1015,11 @@ static int _output_as_rows(struct dm_report *rh)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!dm_pool_begin_object(rh->mem, 512)) {
|
||||||
|
log_error("dm_report: Unable to allocate output line");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ((rh->flags & DM_REPORT_OUTPUT_HEADINGS)) {
|
if ((rh->flags & DM_REPORT_OUTPUT_HEADINGS)) {
|
||||||
if (!dm_pool_grow_object(rh->mem, rh->fields[fp->field_num].heading, 0)) {
|
if (!dm_pool_grow_object(rh->mem, rh->fields[fp->field_num].heading, 0)) {
|
||||||
log_error("dm_report: Failed to extend row for field name");
|
log_error("dm_report: Failed to extend row for field name");
|
||||||
|
Loading…
Reference in New Issue
Block a user