Problem
print crack string value.
API mv_engine_config_get_string_attribute is designed to get pointer
parameter(malloc inside). Change to pointer and free after print value.
Change-Id: I180612a0f151151fab6dd88de43ccbcddf053ccd
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
int int_value = 0;
double double_value = 0.0;
bool bool_value = false;
- char str_value[1024];
+ char *str_value = NULL;
switch (attribute_type) {
case MV_ENGINE_CONFIG_ATTR_TYPE_DOUBLE:
if (MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE ==
}
printf("Default string attribute %s was set to %s in engine\n",
attribute_name, str_value);
+ if (str_value != NULL) {
+ free(str_value);
+ str_value = NULL;
+ }
break;
default:
printf("Not supported attribute type\n");