crypto/ocsp/ocsp_ext.c:455: error: USE_AFTER_FREE
  call to `OBJ_txt2nid()` eventually accesses memory that was invalidated by call to `free()` on line 455 indirectly during the call to `OBJ_txt2nid()`.
Showing all 17 steps of the trace


crypto/ocsp/ocsp_ext.c:455:20: invalidation part of the trace starts here
453.           goto err;
454.       while (oids && *oids) {
455.           if ((nid = OBJ_txt2nid(*oids)) != NID_undef && (o = OBJ_nid2obj(nid)))
                          ^
456.               sk_ASN1_OBJECT_push(sk, o);
457.           oids++;

crypto/ocsp/ocsp_ext.c:455:20: global variable `added` accessed here
  453.           goto err;
  454.       while (oids && *oids) {
  455.           if ((nid = OBJ_txt2nid(*oids)) != NID_undef && (o = OBJ_nid2obj(nid)))
                            ^
  456.               sk_ASN1_OBJECT_push(sk, o);
  457.           oids++;

crypto/ocsp/ocsp_ext.c:455:20: when calling `OBJ_txt2nid` here
  453.           goto err;
  454.       while (oids && *oids) {
  455.           if ((nid = OBJ_txt2nid(*oids)) != NID_undef && (o = OBJ_nid2obj(nid)))
                            ^
  456.               sk_ASN1_OBJECT_push(sk, o);
  457.           oids++;

crypto/objects/obj_dat.c:603:11: global variable `added` accessed here
    601.       ASN1_OBJECT *obj;
    602.       int nid;
    603.       obj = OBJ_txt2obj(s, 0);
                     ^
    604.       nid = OBJ_obj2nid(obj);
    605.       ASN1_OBJECT_free(obj);

crypto/objects/obj_dat.c:603:11: passed as argument to `OBJ_txt2obj`
    601.       ASN1_OBJECT *obj;
    602.       int nid;
    603.       obj = OBJ_txt2obj(s, 0);
                     ^
    604.       nid = OBJ_obj2nid(obj);
    605.       ASN1_OBJECT_free(obj);

crypto/objects/obj_dat.c:603:11: return from call to `OBJ_txt2obj`
    601.       ASN1_OBJECT *obj;
    602.       int nid;
    603.       obj = OBJ_txt2obj(s, 0);
                     ^
    604.       nid = OBJ_obj2nid(obj);
    605.       ASN1_OBJECT_free(obj);

crypto/objects/obj_dat.c:603:5: assigned
    601.       ASN1_OBJECT *obj;
    602.       int nid;
    603.       obj = OBJ_txt2obj(s, 0);
               ^
    604.       nid = OBJ_obj2nid(obj);
    605.       ASN1_OBJECT_free(obj);

crypto/objects/obj_dat.c:605:5: when calling `ASN1_OBJECT_free` here
    603.       obj = OBJ_txt2obj(s, 0);
    604.       nid = OBJ_obj2nid(obj);
    605.       ASN1_OBJECT_free(obj);
               ^
    606.       return nid;
    607.   }

crypto/asn1/a_object.c:380:1: parameter `a` of ASN1_OBJECT_free
      378.   }
      379.   
      380. > void ASN1_OBJECT_free(ASN1_OBJECT *a)
      381.   {
      382.       if (a == NULL)

crypto/asn1/a_object.c:399:9: when calling `CRYPTO_free` here
      397.       }
      398.       if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC)
      399.           OPENSSL_free(a);
                     ^
      400.   }
      401.   

crypto/mem.c:234:1: parameter `str` of CRYPTO_free
        232.   }
        233.   
        234. > void CRYPTO_free(void *str)
        235.   {
        236.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem.c:245:5: was invalidated by call to `free()`
        243.       }
        244.   #else
        245.       free(str);
                   ^
        246.   #endif
        247.   }

crypto/ocsp/ocsp_ext.c:455:20: use-after-lifetime part of the trace starts here
453.           goto err;
454.       while (oids && *oids) {
455.           if ((nid = OBJ_txt2nid(*oids)) != NID_undef && (o = OBJ_nid2obj(nid)))
                          ^
456.               sk_ASN1_OBJECT_push(sk, o);
457.           oids++;

crypto/ocsp/ocsp_ext.c:455:20: global variable `added` accessed here
  453.           goto err;
  454.       while (oids && *oids) {
  455.           if ((nid = OBJ_txt2nid(*oids)) != NID_undef && (o = OBJ_nid2obj(nid)))
                            ^
  456.               sk_ASN1_OBJECT_push(sk, o);
  457.           oids++;

crypto/ocsp/ocsp_ext.c:455:20: when calling `OBJ_txt2nid` here
  453.           goto err;
  454.       while (oids && *oids) {
  455.           if ((nid = OBJ_txt2nid(*oids)) != NID_undef && (o = OBJ_nid2obj(nid)))
                            ^
  456.               sk_ASN1_OBJECT_push(sk, o);
  457.           oids++;

crypto/mem.c:234:1: parameter `str` of CRYPTO_free
    232.   }
    233.   
    234. > void CRYPTO_free(void *str)
    235.   {
    236.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem.c:245:5: invalid access occurs here
    243.       }
    244.   #else
    245.       free(str);
               ^
    246.   #endif
    247.   }
