Valmiki Ramayana Kishkindha Kanda Sarga 12 Shloka 23
Original Shlokaतं प्रविष्टं वनं दृष्ट्वा वाली शापभयार्दितः। मुक्तो ह्यसि त्वमित्युक्त्वा स निवृत्तो महाद्युतिः4.12.23।।
1 source checked for this shloka
वनम् grove, प्रविष्टम् entered, तम् him, दृष्ट्वा after seeing, महाद्युतिः effulgent, वाली Vali, त्वम् you, मुक्तः असि हि you have escaped, इति thus, उक्त्वा having said, शापभयात् by the fear of the curse, ततः then, निवृत्तः returned.
Effulgent Vali saw Sugriva entering the (prohibited) grove and turned back due to the fear of the curse (of sage Matanga) saying, 'You have escaped'.