From: Junio C Hamano Date: Wed, 27 Jan 2016 06:50:27 +0000 (-0800) Subject: git: protect against unbalanced calls to {save,restore}_env() X-Git-Tag: v2.8.0-rc0~52^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2e1175d43d05e83fe836e1c8c8e7c25b7ee659ae?ds=inline;hp=2e1175d43d05e83fe836e1c8c8e7c25b7ee659ae git: protect against unbalanced calls to {save,restore}_env() We made sure that save_env_before_alias() does not skip saving the environment when asked to (which led to use-after-free of orig_cwd in restore_env() in the buggy version) with the previous step. Protect against future breakage where somebody adds new callers of these functions in an unbalanced fashion. Signed-off-by: Junio C Hamano ---