Browse Source

* Ported [2433] to 1.2.9

svn: 2590
Bryan Drewery 20 years ago
parent
commit
8e76d57720
2 changed files with 4 additions and 1 deletions
  1. 1 0
      doc/UPDATES
  2. 3 1
      src/botnet.c

+ 1 - 0
doc/UPDATES

@@ -21,6 +21,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed +r bots resolving users by resolved ip before host.
 * Fixed 2 socket leaks in the dns/socket code. (#167)
 * Fixed cmd_[bot]set showing an invalid example for using '-YES'
+* Fixed a mem leak on bot unlinks.
 
 1.2.8
 * Fixed [bot]* cmds depending on case of botnicks.

+ 3 - 1
src/botnet.c

@@ -268,9 +268,11 @@ void rembot(const char *whoin)
       break;
     ptr = &((*ptr)->next);
   }
-  if (!*ptr)
+  if (!*ptr) {
     /* May have just .unlink *'d */
+    free(who);
     return;
+  }
 
   struct userrec *u = get_user_by_handle(userlist, (char *) who);