فهرست منبع

Fix memory leak with rejected channel auth commands

Bryan Drewery 10 سال پیش
والد
کامیت
d51ba3412c
2فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 1 0
      doc/UPDATES.md
  2. 3 1
      src/core_binds.cc

+ 1 - 0
doc/UPDATES.md

@@ -13,6 +13,7 @@
   * Fix not handling auto-op in minutely channel rechecks.
   * Fix auto-voice and auto-op not applying after a nick change.
   * Don't truncate bot's join time on .reset.
+  * Fix various small memory leaks.
 
 # 1.4.6
   * Disable demo TCL support by default to prevent confusion during build.

+ 3 - 1
src/core_binds.cc

@@ -233,8 +233,10 @@ int real_check_bind_dcc(const char *cmd, int idx, const char *text, Auth *auth)
   }
 
   if (entry && auth) {
-    if (!(entry->cflags & AUTH))
+    if (!(entry->cflags & AUTH)) {
+      free(args);
       return 0;
+    }
   }
 
   hits = 0;