SegFault?


SUBMITTED BY: Guest

DATE: Dec. 20, 2013, 6:46 p.m.

FORMAT: C++

SIZE: 340 Bytes

HITS: 18063

  1. void returnVans(TTRAIN * train) {
  2. if (train == NULL)return;
  3. TVAN* now = train -> m_Start;
  4. train->m_Count = 0;
  5. train->m_Start = NULL;
  6. while(now!=NULL){
  7. free(now -> m_To);
  8. TVAN* temp = now;
  9. free(temp);
  10. now = temp -> m_Next;
  11. }
  12. return;
  13. }

comments powered by Disqus