fix(diff): resource leak on :diffput E787 error path #40686

Coverity CID 649080/649081
This commit is contained in:
Justin M. Keyes
2026-07-11 07:15:04 -04:00
committed by GitHub
parent eb2e695e40
commit 0f7bd6a3cd

View File

@@ -3815,6 +3815,7 @@ void ex_diffgetput(exarg_T *eap)
change_warning(curbuf, 0);
if (diff_buf_idx(curbuf, curtab) != idx_to) {
emsg(_("E787: Buffer changed unexpectedly"));
aucmd_restbuf(&aco);
goto theend;
}
}