aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Jackson <PatrickSJackson@gmail.com>2016-09-02 15:41:55 -0700
committerJustin M. Keyes <justinkz@gmail.com>2016-09-03 00:41:55 +0200
commit0253766b5d812209320a14c093990e3b417510f9 (patch)
tree6a14e7f3726852a87a0b8bb9fa42fbb603630f1e
parentf175b281cf3e6d5287663b79c4a7f705eb83301a (diff)
downloadrneovim-0253766b5d812209320a14c093990e3b417510f9.tar.gz
rneovim-0253766b5d812209320a14c093990e3b417510f9.tar.bz2
rneovim-0253766b5d812209320a14c093990e3b417510f9.zip
lint: Close resource leak (#5288)
-rw-r--r--src/nvim/regexp_nfa.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 92dbd693ea..1a8de28feb 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -4855,9 +4855,15 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start,
// recursive_regmatch(). Allow interrupting them with CTRL-C.
fast_breakcheck();
if (got_int) {
+#ifdef NFA_REGEXP_DEBUG_LOG
+ fclose(debug);
+#endif
return false;
}
if (nfa_time_limit != NULL && profile_passed_limit(*nfa_time_limit)) {
+#ifdef NFA_REGEXP_DEBUG_LOG
+ fclose(debug);
+#endif
return false;
}