Skip to content

Commit

Permalink
MFH: fix leak when binding a variable to the same placeholder several…
Browse files Browse the repository at this point in the history
… times
  • Loading branch information
tony2001 committed Sep 12, 2006
1 parent 7e17f85 commit 7800711
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/oci8/oci8_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,9 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
memset((void*)&bind,0,sizeof(php_oci_bind));
if (zend_hash_find(statement->binds, name, name_len + 1, (void **)&old_bind) == SUCCESS) {
bindp = old_bind;
if (bindp->zval) {
zval_ptr_dtor(&bindp->zval);
}
} else {
zend_hash_update(statement->binds, name, name_len + 1, &bind, sizeof(php_oci_bind), (void **)&bindp);
}
Expand Down

0 comments on commit 7800711

Please sign in to comment.