Ver código fonte

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 13 anos atrás
pai
commit
6f8680a94a
1 arquivos alterados com 1 adições e 0 exclusões
  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);
             }