Changed to *loc_vec. The function get a pointer to local array.