=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/openssl/cms.c,v retrieving revision 1.17 retrieving revision 1.18 diff -c -r1.17 -r1.18 *** src/usr.bin/openssl/cms.c 2020/01/04 14:17:55 1.17 --- src/usr.bin/openssl/cms.c 2021/12/26 15:23:37 1.18 *************** *** 1,4 **** ! /* $OpenBSD: cms.c,v 1.17 2020/01/04 14:17:55 inoguchi Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ --- 1,4 ---- ! /* $OpenBSD: cms.c,v 1.18 2021/12/26 15:23:37 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ *************** *** 444,451 **** if ((nparam = malloc(sizeof(struct cms_key_param))) == NULL) goto end; nparam->idx = keyidx; ! if ((nparam->param = sk_OPENSSL_STRING_new_null()) == NULL) goto end; nparam->next = NULL; if (key_first == NULL) key_first = nparam; --- 444,453 ---- if ((nparam = malloc(sizeof(struct cms_key_param))) == NULL) goto end; nparam->idx = keyidx; ! if ((nparam->param = sk_OPENSSL_STRING_new_null()) == NULL) { ! free(nparam); goto end; + } nparam->next = NULL; if (key_first == NULL) key_first = nparam;