Преглед изворни кода

* Another lostdcc() double free() bug fix

svn: 2075
Bryan Drewery пре 21 година
родитељ
комит
db78d48af1
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      src/dccutil.c

+ 2 - 0
src/dccutil.c

@@ -446,6 +446,8 @@ lostdcc(int n)
   else if (dcc[n].u.other)
   else if (dcc[n].u.other)
     free(dcc[n].u.other);
     free(dcc[n].u.other);
 
 
+  dcc[n].u.other = NULL;
+
 //  This is also done when we new_dcc(), so don't bother for now, we set sock/type to NULL, so it won't even be 
 //  This is also done when we new_dcc(), so don't bother for now, we set sock/type to NULL, so it won't even be 
 //  parsed by anything.
 //  parsed by anything.
 //  egg_bzero(&dcc[n], sizeof(struct dcc_t));
 //  egg_bzero(&dcc[n], sizeof(struct dcc_t));