Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17478

Modified Files:
        merovingian.mx 
Log Message:
Don't leak a sabdb struct opon each start of an mserver via merovingian.


U merovingian.mx
Index: merovingian.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian.mx,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- merovingian.mx      22 Apr 2008 19:43:07 -0000      1.39
+++ merovingian.mx      22 Apr 2008 20:01:30 -0000      1.40
@@ -530,7 +530,8 @@
                        /* give the database a break */
                        MT_sleep_ms(500);
                        /* stats cannot be NULL, as we don't allow starting not
-                        * existing databases */
+                        * existing databases, note that we need to run this 
loop at
+                        * least once not to leak */
                        SABAOTHfreeStatus(stats);
                        er = SABAOTHgetStatus(stats, database);
                        if (er != MAL_SUCCEED) {
@@ -550,7 +551,11 @@
                }
                /* if we've never found a connection, try to figure out why */
                if (i >= 20) {
-                       switch ((*stats)->state) {
+                       int state = (*stats)->state;
+
+                       SABAOTHfreeStatus(stats);
+
+                       switch (state) {
                                case SABdbRunning:
                                        /* not sure what's going on with it, 
but its not
                                         * like we want to have it, so kill it 
*/
@@ -603,6 +608,8 @@
                                        "mode during startup", database);
                }
 
+               SABAOTHfreeStatus(stats);
+
                /* from now on the SIGCHLD handler can find this database */
                dp->started = 1;
 


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to