From 2c82302421d4a2b24b1c97ccabb635d46c617bef Mon Sep 17 00:00:00 2001 From: "drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Mon, 11 Feb 2008 21:02:15 +0000 Subject: [PATCH] BUILD : 1.7.21 (1381) BUGS : 868 NOTES : Fixed memory leak in add_akill(). git-svn-id: svn://svn.anope.org/anope/trunk@1381 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1096 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + src/operserv.c | 11 +++++++++-- version.log | 6 +++++- 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 - 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.