From 60e3565024c9067f556bb3b9cf2670c5bae68b1d Mon Sep 17 00:00:00 2001 From: Utz-Uwe Haus <uhaus@hpe.com> Date: Thu, 15 Jul 2021 15:24:58 +0000 Subject: [PATCH] fix leak on incoming attribute override --- attributes/maestro-schema.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/attributes/maestro-schema.c b/attributes/maestro-schema.c index 049ee9da..1511d11d 100644 --- a/attributes/maestro-schema.c +++ b/attributes/maestro-schema.c @@ -2647,13 +2647,8 @@ mstro_attribute_dict_set_kventry(mstro_attribute_dict dict, MSTRO_CDO_ATTR_VALUE_double, &tmp, true); } case MSTRO__POOL__AVAL__VAL_STRING: { - char *tmp = strdup(aval->string); - if(tmp==NULL) { - ERR("Failed to duplicate string value\n"); - return MSTRO_NOMEM; - } return mstro_attribute_dict_set(dict, key, - MSTRO_CDO_ATTR_VALUE_cstring, tmp, false); + MSTRO_CDO_ATTR_VALUE_cstring, aval->string, true); } case MSTRO__POOL__AVAL__VAL_BYTES: { /* FIXME: blobs still have issues in their handling. For now we -- GitLab