From numerical minimization of a model free-energy functional for a system of hard spheres, we show that the width of the local peaks of the time-averaged density field at a glassy free-energy minimum exhibits large spatial variation, similar to that of the ``local Debye-Waller factor″ in simulations of dynamical heterogeneity. Molecular dynamics simulations starting from a particle configuration generated from the density distribution at a glassy free-energy minimum show similar spatial heterogeneity in the degree of localization, implying a direct connection between dynamical heterogeneity and the structure of glassy free-energy minima.