mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
The yes_no() function was leaking memory when returning early from the loop, as the 'answer' buffer allocated by getline() was not freed before the return statements. Restructure the function to use a single exit point, ensuring free(answer) is always called before returning. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Volkan Unal <vunal@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>