fixed problems in mysql_stmt_init (missing alloc from stmt)

This commit is contained in:
Georg Richter 2004-03-18 13:04:55 +00:00
parent 848f123645
commit e6ac744282

View file

@ -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;
}