Fossil SCM

Fix a memory leak of the path to a versioned-setting file in print_setting().

stephan 2023-01-18 00:47 trunk
Commit c76b00197f5e0fce77d979e0fd1e4dce83663c8b2ac65e2975d45c912b780fc8
1 file changed +1
+1
--- src/db.c
+++ src/db.c
@@ -3979,10 +3979,11 @@
39793979
g.zLocalRoot, pSetting->name);
39803980
if( file_size(blob_str(&versionedPathname), ExtFILE)>=0 ){
39813981
fossil_print(" (overridden by contents of file .fossil-settings/%s)\n",
39823982
pSetting->name);
39833983
}
3984
+ blob_reset(&versionedPathname);
39843985
}
39853986
db_finalize(&q);
39863987
}
39873988
39883989
#if INTERFACE
39893990
--- src/db.c
+++ src/db.c
@@ -3979,10 +3979,11 @@
3979 g.zLocalRoot, pSetting->name);
3980 if( file_size(blob_str(&versionedPathname), ExtFILE)>=0 ){
3981 fossil_print(" (overridden by contents of file .fossil-settings/%s)\n",
3982 pSetting->name);
3983 }
 
3984 }
3985 db_finalize(&q);
3986 }
3987
3988 #if INTERFACE
3989
--- src/db.c
+++ src/db.c
@@ -3979,10 +3979,11 @@
3979 g.zLocalRoot, pSetting->name);
3980 if( file_size(blob_str(&versionedPathname), ExtFILE)>=0 ){
3981 fossil_print(" (overridden by contents of file .fossil-settings/%s)\n",
3982 pSetting->name);
3983 }
3984 blob_reset(&versionedPathname);
3985 }
3986 db_finalize(&q);
3987 }
3988
3989 #if INTERFACE
3990

Keyboard Shortcuts

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