mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Fix strdup memory leak in str_list_dup().
This commit is contained in:
parent
7d6a7e7d3b
commit
9eea0107ba
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.29 -
|
Version 2.02.29 -
|
||||||
==================================
|
==================================
|
||||||
|
Fix strdup memory leak in str_list_dup().
|
||||||
Avoid static link failure with some SELinux libraries.
|
Avoid static link failure with some SELinux libraries.
|
||||||
Diagnose invalid PE values given on the pvmove command line (64-bit systems).
|
Diagnose invalid PE values given on the pvmove command line (64-bit systems).
|
||||||
Include strerror string in dev_open_flags' stat failure message.
|
Include strerror string in dev_open_flags' stat failure message.
|
||||||
|
@ -74,7 +74,7 @@ int str_list_dup(struct dm_pool *mem, struct list *sllnew,
|
|||||||
list_init(sllnew);
|
list_init(sllnew);
|
||||||
|
|
||||||
list_iterate_items(sl, sllold) {
|
list_iterate_items(sl, sllold) {
|
||||||
if (!str_list_add(mem, sllnew, strdup(sl->str))) {
|
if (!str_list_add(mem, sllnew, dm_pool_strdup(mem, sl->str))) {
|
||||||
stack;
|
stack;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -908,6 +908,7 @@ static struct physical_volume *_find_pv_by_name(struct cmd_context *cmd,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME Can fail when no PV mda */
|
||||||
if (!pv->vg_name[0]) {
|
if (!pv->vg_name[0]) {
|
||||||
log_error("Physical volume %s not in a volume group", pv_name);
|
log_error("Physical volume %s not in a volume group", pv_name);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user