From 3c4342ab5aea1aeb83d0d4e34d215f0e113daba1 Mon Sep 17 00:00:00 2001 From: Jason King Date: Tue, 8 May 2018 21:44:21 -0500 Subject: 9644 Double-free in crypto tests on failure Reviewed by: Dan McDonald Reviewed by: Mike Zeller Reviewed by: Garrett D'Amore Reviewed by: Andrew Stormont Reviewed by: Yuri Pankov Reviewed by: Andy Fiddaman Reviewed by: Toomas Soome Approved by: Gordon Ross --- usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c | 3 +-- usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c b/usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c index 260821dcac..f19aa0b7c2 100644 --- a/usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c +++ b/usr/src/test/crypto-tests/tests/common/cryptotest_kcf.c @@ -11,6 +11,7 @@ /* * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018, Joyent, Inc. */ #include @@ -134,7 +135,6 @@ get_mech_info(crypto_op_t *op) (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; @@ -158,7 +158,6 @@ get_hsession_by_mech(crypto_op_t *op) (void) fprintf(stderr, "could not find provider for mechanism %llu\n", mech.mech_type); - (void) cryptotest_close(op); return (CTEST_MECH_NO_PROVIDER); } diff --git a/usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c b/usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c index db15968b49..0506110e3c 100644 --- a/usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c +++ b/usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c @@ -104,7 +104,6 @@ get_mech_info(crypto_op_t *op) cryptotest_error("get_mech_info", rv); (void) fprintf(stderr, "failed to resolve mechanism name %s\n", op->mechname); - (void) cryptotest_close(op); return (CTEST_NAME_RESOLVE_FAILED); } return (rv); @@ -121,7 +120,6 @@ get_hsession_by_mech(crypto_op_t *op) (void) fprintf(stderr, "could not find provider for mechanism %lu\n", op->mech); - (void) cryptotest_close(op); return (CTEST_MECH_NO_PROVIDER); } return (rv); -- cgit v1.2.3 From 6920cc4db7ff7cfb581fbacad920de3d9a681303 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 10 Jul 2018 22:59:23 +0300 Subject: 9648 policykit: unused functions Reviewed by: Andrew Stormont Reviewed by: Michal Nowak Reviewed by: Ken Mays Reviewed by: Yuri Pankov Approved by: Dan McDonald --- usr/src/cmd/policykit/Makefile | 1 + usr/src/lib/policykit/Makefile.com | 1 + 2 files changed, 2 insertions(+) diff --git a/usr/src/cmd/policykit/Makefile b/usr/src/cmd/policykit/Makefile index db571b927f..0388c9fa5a 100644 --- a/usr/src/cmd/policykit/Makefile +++ b/usr/src/cmd/policykit/Makefile @@ -38,6 +38,7 @@ CPPFLAGS += -DPACKAGE_VERSION=\"$(POLICYKIT_VERSION)\" CSTD = $(CSTD_GNU99) CERRWARN += -_gcc=-Wno-unused-variable +CERRWARN += -_gcc=-Wno-unused-function ROOTUSRSBINPROG = $(PROG:%=$(ROOTUSRSBIN)/%) diff --git a/usr/src/lib/policykit/Makefile.com b/usr/src/lib/policykit/Makefile.com index 89fd9296b7..d3b8c15f4b 100644 --- a/usr/src/lib/policykit/Makefile.com +++ b/usr/src/lib/policykit/Makefile.com @@ -29,6 +29,7 @@ include $(SRC)/lib/policykit/Makefile.policykit CPPFLAGS = $(POLICYKIT_DBUS_CPPFLAGS) $(POLICYKIT_GLIB_CPPFLAGS) $(CPPFLAGS.master) CERRWARN += -_gcc=-Wno-unused-variable +CERRWARN += -_gcc=-Wno-unused-function CSTD = $(CSTD_GNU99) -- cgit v1.2.3