Change-Id: I2409b045ec0c46fc99cf589ae06d58de2ed23289
Signed-off-by: jkjo92 <jkjo92@samsung.com>
memcpy(*result, ptr, size * nmemb);
} else {
size_t len = strlen(*result);
+ char* result_temp = *result;
*result = realloc(*result, len + size * nmemb + 1);
+ if (*result == NULL)
+ OAUTH2_FREE(result_temp);
OAUTH2_RETURN_VAL(*result, {}, OAUTH2_ERROR_OUT_OF_MEMORY,
"Out of memory");
memcpy(*result + len, ptr, size * nmemb);