[66019] trunk/base/src/registry2.0

jmr at macports.org jmr at macports.org
Sun Apr 4 19:45:59 PDT 2010


Revision: 66019
          http://trac.macports.org/changeset/66019
Author:   jmr at macports.org
Date:     2010-04-04 19:45:58 -0700 (Sun, 04 Apr 2010)
Log Message:
-----------
prepared statement leaks

Modified Paths:
--------------
    trunk/base/src/registry2.0/graph.c
    trunk/base/src/registry2.0/item.c
    trunk/base/src/registry2.0/util.c

Modified: trunk/base/src/registry2.0/graph.c
===================================================================
--- trunk/base/src/registry2.0/graph.c	2010-04-05 02:32:45 UTC (rev 66018)
+++ trunk/base/src/registry2.0/graph.c	2010-04-05 02:45:58 UTC (rev 66019)
@@ -49,6 +49,7 @@
         fprintf(stderr, "error: registry db not detached correctly (%s)\n",
                 sqlite3_errmsg(g->db));
     }
+    sqlite3_finalize(stmt);
     free(g);
 }
 

Modified: trunk/base/src/registry2.0/item.c
===================================================================
--- trunk/base/src/registry2.0/item.c	2010-04-05 02:32:45 UTC (rev 66018)
+++ trunk/base/src/registry2.0/item.c	2010-04-05 02:45:58 UTC (rev 66019)
@@ -213,6 +213,7 @@
         Tcl_ListObjAppendElement(interp, result, procObj);
         r = sqlite3_step(stmt);
     }
+    sqlite3_finalize(stmt);
     Tcl_SetObjResult(interp, result);
     return TCL_OK;
 }

Modified: trunk/base/src/registry2.0/util.c
===================================================================
--- trunk/base/src/registry2.0/util.c	2010-04-05 02:32:45 UTC (rev 66018)
+++ trunk/base/src/registry2.0/util.c	2010-04-05 02:45:58 UTC (rev 66019)
@@ -236,9 +236,10 @@
                 return TCL_ERROR;
             }
         }
+        sqlite3_finalize(stmt);
         return TCL_OK;
     } else {
-        sqlite3_free(query);
+        sqlite3_finalize(stmt);
         set_sqlite_result(interp, db, query);
         return TCL_ERROR;
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100404/cd3d0379/attachment.html>


More information about the macports-changes mailing list