We analyze free energy and specific heat for fermions interacting with gapless bosons at a quantum-critical point (QCP) in a metal. We use the Luttinger-Ward-Eliashberg formula for the free energy in the normal state, which includes contributions from bosons, fermions, and their interaction, all expressed via fully dressed fermionic and bosonic propagators. The sum of the last two contributions is the free energy $F_\gamma$ of an effective low-energy model of fermions with boson-mediated dynamical 4-fermion interaction $V (\Omega_m) \propto 1/|\Omega_m|^\gamma$ (the $\gamma-$model). This purely electronic model has been used to analyze the interplay between non-Fermi liquid (non-FL) behavior and pairing near a QCP, which are both independent of the upper energy cutoff $\Lambda$. However, the specific heat $C_\gamma (T)$, obtained from $F_\gamma$, does depend on $\Lambda$. We argue that this dependence is spurious and cancels out, once we include the contribution from bosons. We compare our $C(T)$ with the one obtained within the $\gamma-$model using recently proposed regularization of $F_\gamma$. We argue that for $\gamma <1$, the full $C(T)$ and the regularized $C_\gamma (T)$ differ by a $\gamma-$dependent prefactor, while for $\gamma >1$, the full $C(T)$ is the sum of $ C_\gamma (T)$ and the specific heat of free bosons with fully dressed mass. For these $\gamma$, $C_\gamma (T)$ is negative. The authors of Ref. [1] argued that a negative $ C_\gamma (T)$ implies that the normal state becomes unstable at some distance to a QCP. In our calculation, both terms in $C(T)$ come from the same source, and $ C_\gamma (T)$ is smaller as long as vertex corrections can be safely neglected. We then argue that the normal state remains stable even at a QCP.