Explorar el Código

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

(cherry picked from commit 69d43fbacdf121b6c3ab22686f9089d9c7859591)
(cherry picked from commit 71165758575b606bea73c0caf55f861b9223ced9)
Daniel-Constantin Mierla hace 11 años
padre
commit
4bc741b3d8
Se han modificado 1 ficheros con 1 adiciones y 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;
 	}