projects
/
m6w6
/
ext-pq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
c223e1c
)
fix NULL deref with circular refs
author
Michael Wallner
<mike@php.net>
Wed, 3 Dec 2014 10:04:55 +0000
(11:04 +0100)
committer
Michael Wallner
<mike@php.net>
Wed, 3 Dec 2014 10:04:55 +0000
(11:04 +0100)
src/php_pqcur.c
patch
|
blob
|
history
src/php_pqtxn.c
patch
|
blob
|
history
diff --git
a/src/php_pqcur.c
b/src/php_pqcur.c
index 16057e8c5420a20d4117efa8057b4ddbb53e9bdd..1ff10da22c5e9d103a2b0dc2aeacaa30a669efee 100644
(file)
--- a/
src/php_pqcur.c
+++ b/
src/php_pqcur.c
@@
-31,7
+31,7
@@
static HashTable php_pqcur_object_prophandlers;
static void cur_close(php_pqcur_object_t *obj TSRMLS_DC)
{
- if (obj->intern->open) {
+ if (obj->intern->open
&& obj->intern->conn->intern
) {
PGresult *res;
smart_str cmd = {0};
diff --git
a/src/php_pqtxn.c
b/src/php_pqtxn.c
index 0f5c4eb716c44dd0eb63ec7db88d63cb5f0ea71a..b48cf7e568b673b2052e7d07edb624b34bed5f79 100644
(file)
--- a/
src/php_pqtxn.c
+++ b/
src/php_pqtxn.c
@@
-54,7
+54,7
@@
static void php_pqtxn_object_free(void *o TSRMLS_DC)
fprintf(stderr, "FREE txn(#%d) %p (conn(#%d): %p)\n", obj->zv.handle, obj, obj->intern->conn->zv.handle, obj->intern->conn);
#endif
if (obj->intern) {
- if (obj->intern->open) {
+ if (obj->intern->open
&& obj->intern->conn->intern
) {
PGresult *res = PQexec(obj->intern->conn->intern->conn, "ROLLBACK");
if (res) {