1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +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 lv_create_params_t params,
const char *name) const char *name)
{ {
struct lvm_property_value rc; struct lvm_property_value rc = {
.is_valid = 0
rc.is_valid = 0; };
if (params && params->magic == LV_CREATE_PARAMS_MAGIC) { if (params && params->magic == LV_CREATE_PARAMS_MAGIC) {
rc = get_property(NULL, NULL, NULL, NULL, NULL, &params->lvp, name); rc = get_property(NULL, NULL, NULL, NULL, NULL, &params->lvp, name);
} else { } else {
log_error("Invalid lv_create_params parameter"); log_error("Invalid lv_create_params parameter");
} }
return rc; return rc;
} }