summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/operserv.c11
-rw-r--r--version.log6
3 files changed, 15 insertions, 3 deletions
diff --git a/Changes b/Changes
index 0d884d705..eefe5de03 100644
--- a/Changes
+++ b/Changes
@@ -33,6 +33,7 @@ Anope Version S V N
02/07 F findchan() debug messages not being logical. [#857]
02/07 F NickServ replying to SVSNICK command when OperServ must. [#861]
02/11 F Fixed configure script so it will complain about args. [#864]
+02/11 F Fixed memory leak in add_akill(). [#868]
Provided by Johno Crawford <johno.crawford@gmail.com> - 2008
02/08 F x86_64 generating improper SHA1 hash values. [#856]
diff --git a/src/operserv.c b/src/operserv.c
index b0f1925d2..d9c363b5d 100644
--- a/src/operserv.c
+++ b/src/operserv.c
@@ -793,15 +793,22 @@ int add_akill(User * u, char *mask, const char *by, const time_t expires,
/* We can now (really) add the AKILL. */
mask2 = sstrdup(mask);
host = strchr(mask2, '@');
- if (!host)
+
+ if (!host) {
+ free(mask2);
return -1;
+ }
+
user = mask2;
*host = 0;
host++;
entry = scalloc(sizeof(Akill), 1);
- if (!entry)
+
+ if (!entry) {
+ free(mask2);
return -1;
+ }
entry->user = sstrdup(user);
entry->host = sstrdup(host);
diff --git a/version.log b/version.log
index ac1c30986..22c93a36b 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="21"
VERSION_EXTRA="-svn"
-VERSION_BUILD="1380"
+VERSION_BUILD="1381"
# $Log$
#
+# BUILD : 1.7.21 (1381)
+# BUGS : 868
+# NOTES : Fixed memory leak in add_akill().
+#
# BUILD : 1.7.21 (1380)
# BUGS : 864
# NOTES : Fixed configure script so it will complain about args.