Print this page
9644 Double-free in crypto tests on failure
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Mike Zeller <mike.zeller@joyent.com>

*** 9,18 **** --- 9,19 ---- * http://www.illumos.org/license/CDDL. */ /* * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018, Joyent, Inc. */ #include <fcntl.h> #include <strings.h> #include <unistd.h>
*** 132,142 **** if (kcf_do_ioctl(CRYPTO_GET_MECHANISM_NUMBER, (uint_t *)&get_number, "get_mech_info") != CRYPTO_SUCCESS) { (void) fprintf(stderr, "failed to resolve mechanism name %s\n", op->mechname); - (void) cryptotest_close(op); return (CTEST_NAME_RESOLVE_FAILED); } op->mech = get_number.pn_internal_number; return (CRYPTO_SUCCESS); } --- 133,142 ----
*** 156,166 **** if (rv != 0 || mech.rv != CRYPTO_SUCCESS) { (void) fprintf(stderr, "could not find provider for mechanism %llu\n", mech.mech_type); - (void) cryptotest_close(op); return (CTEST_MECH_NO_PROVIDER); } op->hsession = mech.session_id; --- 156,165 ----