diff --git a/tests/libtest/ns.c b/tests/libtest/ns.c index 96d8181052..e0b6569da3 100644 --- a/tests/libtest/ns.c +++ b/tests/libtest/ns.c @@ -400,15 +400,9 @@ extract_qctx(void *arg, void *data, isc_result_t *resultp) { * gets unwound. */ qctx = isc_mem_get(mctx, sizeof(*qctx)); - if (qctx != NULL) { - memmove(qctx, (query_ctx_t *)arg, sizeof(*qctx)); - } + memmove(qctx, (query_ctx_t *)arg, sizeof(*qctx)); qctxp = (query_ctx_t **)data; - /* - * If memory allocation failed, the supplied pointer will simply be set - * to NULL. We rely on the user of this hook to react properly. - */ *qctxp = qctx; *resultp = ISC_R_UNSET;