func: void *reverseStr(void * data) struct stonesoup_data * stonesoupData = ( struct stonesoup_data * ) data ; char * temp_str ; temp_str = malloc ( sizeof ( char ) * ( stonesoupData -> data_size + 1 ) ); temp_str [ stonesoupData -> data_size - 1 - i ] = stonesoupData -> data [ i ]; temp_str [ stonesoupData -> data_size ] = '\0'; free ( stonesoupData -> data ); stonesoupData -> data = NULL; stonesoupData -> data = temp_str; 