static void free_image_node(image_node * current) { print_node(current->item); SCI_FREE(current->item->mem); SCI_FREE(current->item->image_id); SCI_FREE(current->item); SCI_FREE(current); }
/**************************************************************** 函数名: MMI_GenPartyNumber 功 能 :由str格式的电话号码处理成为bcd格式的处理函数 输入参数:uint8 *tele_num_ptr str格式的电话号码的首地址 int16 tele_len str格式的电话号码的长度 MMI_PARTY_NUMBER_T *party_num 生成的bcd码及类型存储的结构体首地址 输出参数:无 编写者 :郭碧莲 修改记录:创建 2007/8/25 ****************************************************************/ BOOLEAN MMI_GenPartyNumber( uint8 *tele_num_ptr, int16 tele_len, MMI_PARTY_NUMBER_T *party_num ) { uint8 offset = 0; uint8* tele_num = PNULL; SCI_TRACE_LOW("<<<<<<MMI_GenPartyNumber<<<<<<"); //check the param SCI_ASSERT( NULL != tele_num_ptr ); SCI_ASSERT( NULL != party_num ); if (0 == tele_len) { party_num->num_len = 0; SCI_TRACE_LOW("<<<<<<MMI_GenPartyNumber length = 0\n"); return FALSE; } tele_num = (uint8*)SCI_ALLOC(tele_len + 1); SCI_MEMSET(tele_num, 0, (tele_len + 1)); MMI_MEMCPY( tele_num, tele_len + 1, tele_num_ptr, tele_len, tele_len); if('+' == tele_num[0]) { party_num->number_type = MN_NUM_TYPE_INTERNATIONAL; offset++; } else { party_num->number_type = MN_NUM_TYPE_UNKNOW; } party_num->num_len = ( tele_len - offset + 1 ) /2; SCI_ASSERT( party_num->num_len <= MN_MAX_ADDR_BCD_LEN); MMI_StrToBcd( PACKED_LSB_FIRST, (char*)( tele_num + offset), (uint8 *)&(party_num->bcd_num) ); SCI_FREE(tele_num); return TRUE; }
/********************************************************** Prototype int spi_os_vfree ( void * addr ) Type function Description free memory with vfree Param input addr : address of memory to be released Return value 0 : fail 1 : success ***********************************************************/ int spi_os_vfree(void *addr) { if (addr == 0) { SPI_OS_ERROR(("spi_os_free fail : addr is 0\n")); return 0; } #ifdef SPI_FEATURE_OMAP4430 vfree(addr); #elif defined SPI_FEATURE_SC8800G SCI_FREE(addr); #endif return 1; }