浏览代码

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 年之前
父节点
当前提交
6f8680a94a
共有 1 个文件被更改,包括 1 次插入0 次删除
  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);
             }