Fossil SCM

Fix a minor memory leak.

drh 2010-11-11 21:36 UTC trunk
Commit 3541444d9d15cc62789b2061e8b89fbbf8c705fe
1 file changed +1
+1
--- src/db.c
+++ src/db.c
@@ -687,10 +687,11 @@
687687
g.dbConfig = 0;
688688
}else{
689689
g.dbConfig = openDatabase(zDbName);
690690
}
691691
g.configOpen = 1;
692
+ free(zDbName);
692693
}
693694
694695
/*
695696
** If zDbName is a valid local database file, open it and return
696697
** true. If it is not a valid local database file, return 0.
697698
--- src/db.c
+++ src/db.c
@@ -687,10 +687,11 @@
687 g.dbConfig = 0;
688 }else{
689 g.dbConfig = openDatabase(zDbName);
690 }
691 g.configOpen = 1;
 
692 }
693
694 /*
695 ** If zDbName is a valid local database file, open it and return
696 ** true. If it is not a valid local database file, return 0.
697
--- src/db.c
+++ src/db.c
@@ -687,10 +687,11 @@
687 g.dbConfig = 0;
688 }else{
689 g.dbConfig = openDatabase(zDbName);
690 }
691 g.configOpen = 1;
692 free(zDbName);
693 }
694
695 /*
696 ** If zDbName is a valid local database file, open it and return
697 ** true. If it is not a valid local database file, return 0.
698

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button