- Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
- Changed phpize not to require libtool. (Jani)
- Fixed several egregious leaks in ext/browscap and sapi/embed. (Andrei)
+- Fixed several leaks in ext/filepro. (Tony)
- Fixed build system to always use bundled libtool files. (Jani)
- Fixed MacOSX shared extensions crashing on Apache startup. (Rasmus)
- Fixed bug #31858 (--disable-cli does not force --without-pear). (Jani)
fp_globals = (fp_global_struct *) LocalAlloc(LPTR, sizeof(fp_global_struct));
TlsSetValue(FPTls, (void *) fp_globals);
#endif
+
+ return SUCCESS;
+}
+/* }}} */
+
+/* {{{ PHP_RINIT_FUNCTION
+ */
+PHP_RINIT_FUNCTION(filepro)
+{
FP_GLOBAL(fp_database)=NULL;
FP_GLOBAL(fp_fcount)=-1;
FP_GLOBAL(fp_keysize)=-1;
FP_GLOBAL(fp_fieldlist)=NULL;
+
+ return SUCCESS;
+}
+/* }}} */
+
+/* {{{ PHP_RSHUTDOWN_FUNCTION
+ */
+PHP_RSHUTDOWN_FUNCTION(filepro)
+{
+ FP_FIELD *tmp, *next;
+ if (FP_GLOBAL(fp_database)) {
+ efree(FP_GLOBAL(fp_database));
+ }
+
+ if (FP_GLOBAL(fp_fieldlist)) {
+ for (tmp = FP_GLOBAL(fp_fieldlist); tmp;) {
+ efree(tmp->name);
+ efree(tmp->format);
+ next = tmp->next;
+ efree(tmp);
+ tmp=next;
+ }
+ }
return SUCCESS;
}
/* }}} */
zend_module_entry filepro_module_entry = {
STANDARD_MODULE_HEADER,
- "filepro", filepro_functions, PHP_MINIT(filepro), PHP_MSHUTDOWN(filepro), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
+ "filepro",
+ filepro_functions,
+ PHP_MINIT(filepro),
+ PHP_MSHUTDOWN(filepro),
+ PHP_RINIT(filepro),
+ PHP_RSHUTDOWN(filepro),
+ NULL,
+ NO_VERSION_YET,
+ STANDARD_MODULE_PROPERTIES
};
tmp = FP_GLOBAL(fp_fieldlist);
while (tmp != NULL) {
next = tmp->next;
+ efree(tmp->name);
+ efree(tmp->format);
efree(tmp);
tmp = next;
}
PHP_FUNCTION(filepro_retrieve);
PHP_MINIT_FUNCTION(filepro);
+PHP_RINIT_FUNCTION(filepro);
+PHP_RSHUTDOWN_FUNCTION(filepro);
PHP_MSHUTDOWN_FUNCTION(filepro);
#else
#define phpext_filepro_ptr NULL