Explorar o código

coverity 12563 Read from pointer after free (fix 2)

The previous commit for coverity issue 12563 fixed the dna_pre_op()
function to avoid reading the target of a freed pointer.  This same
fix needs to be made to dna_be_txn_pre_op().
Nathan Kinder %!s(int64=13) %!d(string=hai) anos
pai
achega
6f8680a94a
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      ldap/servers/plugins/dna/dna.c

+ 1 - 0
ldap/servers/plugins/dna/dna.c

@@ -3481,6 +3481,7 @@ static int dna_be_txn_pre_op(Slapi_PBlock *pb, int modtype)
                 slapi_ch_free_string(&value);
                 slapi_ch_free_string(&new_value);
                 slapi_ch_array_free(types_to_generate);
+                types_to_generate = NULL;
             } else if (types_to_generate) {
                 slapi_ch_free((void **)&types_to_generate);
             }