add func fc_free_iovec_array
parent
b0d57b325d
commit
48ec9c64c6
|
|
@ -463,6 +463,7 @@ static int _realloc_buffer(struct fast_task_info *pTask, const int new_size,
|
||||||
const bool copy_data)
|
const bool copy_data)
|
||||||
{
|
{
|
||||||
char *new_buff;
|
char *new_buff;
|
||||||
|
|
||||||
new_buff = (char *)fc_malloc(new_size);
|
new_buff = (char *)fc_malloc(new_size);
|
||||||
if (new_buff == NULL)
|
if (new_buff == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1277,6 +1277,15 @@ static inline int fc_check_realloc_iovec_array(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void fc_free_iovec_array(iovec_array_t *array)
|
||||||
|
{
|
||||||
|
if (array->iovs != NULL) {
|
||||||
|
free(array->iovs);
|
||||||
|
array->iovs = NULL;
|
||||||
|
array->alloc = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static inline pid_t fc_gettid()
|
static inline pid_t fc_gettid()
|
||||||
{
|
{
|
||||||
#ifdef OS_LINUX
|
#ifdef OS_LINUX
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue