mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Use dm_strdup/dm_free instead of strdup/free.
This commit is contained in:
parent
a83c7816e4
commit
2bea18e504
@ -912,20 +912,20 @@ static int _output_field(struct dm_report *rh, struct dm_report_field *field)
|
||||
size_t buf_size = 0;
|
||||
|
||||
if (rh->flags & DM_REPORT_OUTPUT_FIELD_NAME_PREFIX) {
|
||||
if (!(field_id = strdup(rh->fields[field->props->field_num].id))) {
|
||||
if (!(field_id = dm_strdup(rh->fields[field->props->field_num].id))) {
|
||||
log_error("dm_report: Failed to copy field name");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!dm_pool_grow_object(rh->mem, rh->output_field_name_prefix, 0)) {
|
||||
log_error("dm_report: Unable to extend output line");
|
||||
free(field_id);
|
||||
dm_free(field_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!dm_pool_grow_object(rh->mem, _toupperstr(field_id), 0)) {
|
||||
log_error("dm_report: Unable to extend output line");
|
||||
free(field_id);
|
||||
dm_free(field_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user