Commit 8dfc9852 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

isc_mem_get() return value check used the wrong variable

parent ae0713ca
......@@ -72,7 +72,7 @@ grow_data(isc_lex_t *lex, size_t *remainingp, char **currp, char **prevp) {
char *new;
new = isc_mem_get(lex->mctx, lex->max_token * 2 + 1);
if (lex == NULL)
if (new == NULL)
return (ISC_R_NOMEMORY);
memcpy(new, lex->data, lex->max_token + 1);
*currp = new + (*currp - lex->data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment