1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Initialise params buffer to empty string in _emit_segment.

This commit is contained in:
Alasdair Kergon 2008-06-05 19:10:35 +00:00
parent 095a861018
commit 6196ac7995
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.26 -
=================================
Initialise params buffer to empty string in _emit_segment.
Skip add_dev_node when ioctls disabled.
Make dm_hash_iter safe against deletion.
Accept a NULL pointer to dm_free silently.

View File

@ -1276,7 +1276,6 @@ static int _emit_segment_line(struct dm_task *dmt, struct load_segment *seg, uin
switch(seg->type) {
case SEG_ERROR:
case SEG_ZERO:
params[0] = '\0';
case SEG_LINEAR:
break;
case SEG_MIRRORED:
@ -1434,6 +1433,7 @@ static int _emit_segment(struct dm_task *dmt, struct load_segment *seg,
return 0;
}
params[0] = '\0';
ret = _emit_segment_line(dmt, seg, seg_start, params, paramsize);
dm_free(params);