if (bFullCourse) { long AreaShopListNum = 0; if (piAreaInfo->SPKBN == 0) AreaShopListNum = HMDetailNum - 2; else AreaShopListNum = HMDetailNum - 3; AreaShopList_T *piAreaShopList = (AreaShopList_T*)malloc(sizeof(AreaShopList_T) * AreaShopListNum); int i = 0; HMDetail_T* pHMDetail = pioHMDetail; AreaShopList_T *pAreaShopList = piAreaShopList; while (i < HMDetailNum) { if (strcmp(piBaseInfo->BaseCD, pHMDetail->DlvCD) == 0) { i++; pHMDetail++; continue; } strcpy_s(pAreaShopList->HonNO, pHMDetail->HonNO); strcpy_s(pAreaShopList->ShopCD, pHMDetail->DlvCD); i++; pHMDetail++; pAreaShopList++; } int ret = TimeRoutingW(piBaseInfo, ShopInfoNum, piShopInfo, 1, piAreaInfo, AreaShopListNum, piAreaShopList, pioHMDetail, pszOutputFile, false, bCvs, bWeekExchange); <big>free(piAreaShopList);</big> // error !! why? return ret; } else { ...
while (i < HMDetailNum)
while (i < AreaShopListNum)
free
TimeRoutingW
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)