Change-Id: Id6687a11b495c31f1f37b3b5f33671b8c7ff09c7
Signed-off-by: JinWang An <jinwang.an@samsung.com>
if (length <= 0)
return NULL;
int32_t output_length = 1;
-
- double *values = (double *) malloc(length * sizeof(double));
int max_value_length = 0;
+ double *values = (double *) malloc(length * sizeof(double));
+ if (NULL == values) {
+ fprintf(stderr, "\nError: Out of memory.\n", values);
+ return NULL;
+ }
/* Count output length */
for (int32_t i = 0; i < length; ++i) {