Explorar o código

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

Daniel-Constantin Mierla %!s(int64=11) %!d(string=hai) anos
pai
achega
69d43fbacd
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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;
 	}