diff options
author | Georg Richter <georg@php.net> | 2004-03-18 13:04:55 +0000 |
---|---|---|
committer | Georg Richter <georg@php.net> | 2004-03-18 13:04:55 +0000 |
commit | e6ac744282be614535fa291dbfe40f41157c7a96 (patch) | |
tree | 359fca63b993a160f6676386d60a77bd4c99043c | |
parent | 848f1236453e16932a1670de1fe7d3063376be96 (diff) | |
download | php-git-e6ac744282be614535fa291dbfe40f41157c7a96.tar.gz |
fixed problems in mysql_stmt_init (missing alloc from stmt)
-rw-r--r-- | ext/mysqli/mysqli_api.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index d3ad49837a..0927df66d7 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1675,7 +1675,10 @@ PHP_FUNCTION(mysqli_stmt_init) } MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link"); + stmt = (STMT *)ecalloc(1,sizeof(STMT)); + if (!(stmt->stmt = mysql_stmt_init(mysql))) { + efree(stmt); RETURN_FALSE; } |