X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fasn1%2Ftasn_utl.c;h=f03f9e9ed04b5684daaa71463fc2b07b641569f6;hp=cb245939c46a1d09aea294859c1b5631b9daf888;hb=b2b361f6afb55c501bedef664c1fdc0d71a91d4b;hpb=57358a83a401ef469353b7ebdae0cf3b870a4d5e diff --git a/crypto/asn1/tasn_utl.c b/crypto/asn1/tasn_utl.c index cb245939c4..f03f9e9ed0 100644 --- a/crypto/asn1/tasn_utl.c +++ b/crypto/asn1/tasn_utl.c @@ -50,6 +50,7 @@ int asn1_set_choice_selector(ASN1_VALUE **pval, int value, * then the count is incremented. If op is 0 count is set to 1. If op is -1 * count is decremented and the return value is the current reference count * or 0 if no reference count exists. + * FIXME: return and manage any error from inside this method */ int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it) @@ -68,8 +69,10 @@ int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it) if (op == 0) { *lck = 1; *lock = CRYPTO_THREAD_lock_new(); - if (*lock == NULL) + if (*lock == NULL) { + /* FIXME: should report an error (-1) at this point */ return 0; + } return 1; } CRYPTO_atomic_add(lck, op, &ret, *lock);