diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 1bd5e2fd6059a..4da9f35951527 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -458,13 +458,14 @@ char **php_readline_completion_cb(const char *text, int start, int end) /* libedit will read matches[2] */ matches = calloc(3, sizeof(char *)); if (!matches) { - return NULL; + goto out; } matches[0] = strdup(""); } } } +out: zval_ptr_dtor(¶ms[0]); zval_ptr_dtor(&_readline_array);