  Nuclear superfludity in exotic nuclei close to the drip lines and in the
inner crust matter of neutron stars have common features which can be treated
with the same theoretical tools. In the first part of my lecture I discuss how
two such tools, namely the HFB approach and the linear response theory can be
used to describe the pairing correlations in weakly bound nuclei, in which the
unbound part of the energy spectrum becomes important. Then, using the same
models, I shall discuss how the nuclear superfluidity can affect the thermal
properties of the inner crust of neutron stars.
