This doesn't look quite right - you are creating an MCStringRef with 'linkname' which hasn't been initialized yet. Indeed, 'linkname' appears to just be a copy of p_fname - which is already an MCStringRef.