myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 5fc61cbfaa


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5
Date: Sun, 27 Sep 2009 15:51:21 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5 (commit)
       via  e3b877395231b2496932772f89972538a8872176 (commit)
      from  daa9b4d535d29ef44830eb561ae837754d1811f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5
Author: Giuseppe Scrivano <address@hidden>
Date:   Sun Sep 27 17:47:31 2009 +0200

    Fix some possible memleaks

diff --git a/myserver/src/conf/mime/mime_manager.cpp 
b/myserver/src/conf/mime/mime_manager.cpp
index a29d68f..2432b2b 100644
--- a/myserver/src/conf/mime/mime_manager.cpp
+++ b/myserver/src/conf/mime/mime_manager.cpp
@@ -229,7 +229,10 @@ MimeRecord *MimeManager::readRecord (xmlNodePtr node)
           Regex *r = new Regex;
 
           if (r->compile ((const char*)attrs->children->content, 0))
-            return NULL;
+            {
+              delete r;
+              return NULL;
+            }
 
           rc->pathRegex.push_back (r);
         }
diff --git a/myserver/src/conf/vhost/ip.cpp b/myserver/src/conf/vhost/ip.cpp
index 70874c5..a72867f 100644
--- a/myserver/src/conf/vhost/ip.cpp
+++ b/myserver/src/conf/vhost/ip.cpp
@@ -1,6 +1,6 @@
 /*
   MyServer
-  Copyright (C) 2008 Free Software Foundation, Inc.
+  Copyright (C) 2008, 2009 Free Software Foundation, Inc.
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
@@ -33,6 +33,7 @@ IpRange *IpRange::RangeFactory(const std::string &ipRange)
     return pV6;
   */
 
+  delete pV4;
   return NULL;
 }
 



commit e3b877395231b2496932772f89972538a8872176
Author: Giuseppe Scrivano <address@hidden>
Date:   Sun Sep 27 17:44:42 2009 +0200

    Close the pidfile file on error.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 806e47a..a8c1245 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -610,7 +610,10 @@ int writePidfile (const char* filename)
   sprintf (buff,"%i\n", pid);
   ret = write (pidfile, buff, strlen(buff));
   if(ret == -1)
-    return -1;
+    {
+      close (pidfile);
+      return -1;
+    }
   return close (pidfile);
 }
 #endif

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/conf/mime/mime_manager.cpp |    5 ++++-
 myserver/src/conf/vhost/ip.cpp          |    3 ++-
 myserver/src/myserver.cpp               |    5 ++++-
 3 files changed, 10 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]