I agree with the above and I think testing the return of malloc for NULL might be needed.



m.m_module[i] = (char *)malloc(sizeof(char)*10);


I think cas is right about writing out pointers...