Fossil SCM

Check sqlite3_mprintf() return value in the Tcl integration subsystem.

mistachkin 2015-07-10 20:57 trunk
Commit e7f7f79ce8e0933ac97c60a16b73fae5711dcb1f
1 file changed +1
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -792,10 +792,11 @@
792792
if( zDirName ){
793793
fossil_free(zDirName); zDirName = 0;
794794
}
795795
#endif /* TCL_USE_SET_DLL_DIRECTORY */
796796
}
797
+ if( !zFileName ) break;
797798
hLibrary = dlopen(zFileName, RTLD_NOW | RTLD_GLOBAL);
798799
/* NOTE: If the file name was allocated, free it now. */
799800
if( zFileName!=aFileName ){
800801
sqlite3_free(zFileName); zFileName = 0;
801802
}
802803
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -792,10 +792,11 @@
792 if( zDirName ){
793 fossil_free(zDirName); zDirName = 0;
794 }
795 #endif /* TCL_USE_SET_DLL_DIRECTORY */
796 }
 
797 hLibrary = dlopen(zFileName, RTLD_NOW | RTLD_GLOBAL);
798 /* NOTE: If the file name was allocated, free it now. */
799 if( zFileName!=aFileName ){
800 sqlite3_free(zFileName); zFileName = 0;
801 }
802
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -792,10 +792,11 @@
792 if( zDirName ){
793 fossil_free(zDirName); zDirName = 0;
794 }
795 #endif /* TCL_USE_SET_DLL_DIRECTORY */
796 }
797 if( !zFileName ) break;
798 hLibrary = dlopen(zFileName, RTLD_NOW | RTLD_GLOBAL);
799 /* NOTE: If the file name was allocated, free it now. */
800 if( zFileName!=aFileName ){
801 sqlite3_free(zFileName); zFileName = 0;
802 }
803

Keyboard Shortcuts

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