1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00

@- fixed crash in OCIParse when parsing invalid SQL. (Thies)

This commit is contained in:
Thies C. Arntzen
2000-05-30 09:25:02 +00:00
parent 5ec49e9c79
commit 8c65f81676

View File

@@ -1098,7 +1098,9 @@ static oci_statement *oci_parse(oci_connection *connection, char *query, int len
OCI_NTV_SYNTAX,
OCI_DEFAULT));
if (connection->error) {
/* XXX loose memory */
OCIHandleFree(statement->pStmt, OCI_HTYPE_STMT);
OCIHandleFree(statement->pError, OCI_HTYPE_ERROR);
efree(statement);
return 0;
}
}
@@ -3680,7 +3682,11 @@ PHP_FUNCTION(ociparse)
statement = oci_parse(connection,(*query)->value.str.val,(*query)->value.str.len);
RETURN_RESOURCE(statement->id);
if (statement) {
RETURN_RESOURCE(statement->id);
} else {
RETURN_FALSE;
}
}
/* }}} */