Browse Source

* Another lostdcc() double free() bug fix

svn: 2075
Bryan Drewery 21 năm trước cách đây
mục cha
commit
db78d48af1
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/dccutil.c

+ 2 - 0
src/dccutil.c

@@ -446,6 +446,8 @@ lostdcc(int n)
   else if (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 
 //  parsed by anything.
 //  egg_bzero(&dcc[n], sizeof(struct dcc_t));