A locking device is for locking a heat sink to an electronic device. The
locking device includes a retaining frame and a guiding member positioned
on the retaining frame. The guiding member includes a seat having a base
sitting on the retaining frame, a sleeve extending upwardly from the
seat, and two spaced legs descending from the base of the seat to retain
the guiding member to the retaining frame. A fastener is accommodated in
the sleeve of the guiding member and is kept vertical to the retaining
frame by the guiding member.