From: Georg Richter Date: Thu, 18 Mar 2004 13:04:55 +0000 (+0000) Subject: fixed problems in mysql_stmt_init (missing alloc from stmt) X-Git-Tag: php-5.0.0RC1~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6ac744282be614535fa291dbfe40f41157c7a96;p=php fixed problems in mysql_stmt_init (missing alloc from stmt) --- 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; }