summaryrefslogtreecommitdiff
path: root/ext/sqlite3/sqlite3.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-11-28 15:37:02 (GMT)
committerFelipe Pena <felipe@php.net>2008-11-28 15:37:02 (GMT)
commit9983e2689a66e9e1f739bbba9a4f3a2b690d075a (patch)
treea392ac29079c9f0aa902af286cc067eb2e408ac2 /ext/sqlite3/sqlite3.c
parent836dd82c8eca86f2099c11966ab4f3b53533abb8 (diff)
downloadphp-9983e2689a66e9e1f739bbba9a4f3a2b690d075a.tar.gz
- MFH: Fixed memory leaks in createFunction and createAggregate methods
Diffstat (limited to 'ext/sqlite3/sqlite3.c')
-rw-r--r--ext/sqlite3/sqlite3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 8d4f229..7668fc8 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -791,6 +791,7 @@ PHP_METHOD(sqlite3, createFunction)
MAKE_STD_ZVAL(func->func);
*(func->func) = *callback_func;
zval_copy_ctor(func->func);
+ INIT_PZVAL(func->func);
func->argc = sql_func_num_args;
func->next = db_obj->funcs;
@@ -849,10 +850,12 @@ PHP_METHOD(sqlite3, createAggregate)
MAKE_STD_ZVAL(func->step);
*(func->step) = *step_callback;
zval_copy_ctor(func->step);
+ INIT_PZVAL(func->step);
MAKE_STD_ZVAL(func->fini);
*(func->fini) = *fini_callback;
zval_copy_ctor(func->fini);
+ INIT_PZVAL(func->fini);
func->argc = sql_func_num_args;
func->next = db_obj->funcs;