1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: do not return stack content

Return initialized struct in error path.
This commit is contained in:
Zdenek Kabelac 2013-07-19 17:29:37 +02:00
parent aed4e9c703
commit dedec81d7b

View File

@ -593,15 +593,16 @@ struct lvm_property_value lvm_lv_params_get_property(
const lv_create_params_t params,
const char *name)
{
struct lvm_property_value rc;
rc.is_valid = 0;
struct lvm_property_value rc = {
.is_valid = 0
};
if (params && params->magic == LV_CREATE_PARAMS_MAGIC) {
rc = get_property(NULL, NULL, NULL, NULL, NULL, &params->lvp, name);
} else {
log_error("Invalid lv_create_params parameter");
}
return rc;
}