Просмотр исходного кода

* Fixed a mem leak in egg_dns_cancel

svn: 1813
Bryan Drewery 21 лет назад
Родитель
Сommit
7c1215c892
2 измененных файлов с 5 добавлено и 0 удалено
  1. 1 0
      doc/UPDATES
  2. 4 0
      src/adns.c

+ 1 - 0
doc/UPDATES

@@ -22,6 +22,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed.
 * Eliminated a duplicate struct (conffile)
 * Removed chanset cookie-time-slack
 * Default binpath is now the directory the binary is in when doing -C.
+* Fixed a memory leak in dns
 
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 4 - 0
src/adns.c

@@ -754,6 +754,10 @@ int egg_dns_cancel(int id, int issue_callback)
 	else query_head = q->next;
 	sdprintf("Cancelling query: %s", q->query);
 	if (issue_callback) q->callback(q->id, q->client_data, q->query, NULL);
+	if (q->ip)
+		free(q->ip);
+	if (q->query)
+		free(q->query);
 	free(q);
 	return(0);
 }