浏览代码

srutils/tmrec: reset pointer after free to avoid double deallocation

Daniel-Constantin Mierla 11 年之前
父节点
当前提交
69d43fbacd
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lib/srutils/tmrec.c

+ 1 - 0
lib/srutils/tmrec.c

@@ -343,6 +343,7 @@ int tr_byxxx_init(tr_byxxx_t *_bxp, int _nr)
 	if(!_bxp->req)
 	{
 		pkg_free(_bxp->xxx);
+		_bxp->xxx = NULL;
 		return -1;
 	}