Browse Source

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

Daniel-Constantin Mierla 11 years ago
parent
commit
69d43fbacd
1 changed files with 1 additions and 0 deletions
  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;
 	}