Skip to content

Commit 3c63b26

Browse files
committed
Use zmm for row_c data
This API already doesn't match libmysqlclient, so we may as well use the zmm.
1 parent f1e2cd8 commit 3c63b26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/mysqlnd/mysqlnd_result.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row_c)(MYSQLND_RES * result, voi
695695
DBG_RETURN(FAIL);
696696
}
697697
{
698-
*row = mnd_malloc(field_count * sizeof(char *));
698+
*row = mnd_emalloc(field_count * sizeof(char *));
699699
MYSQLND_FIELD * field = meta->fields;
700700
size_t * lengths = result->unbuf->lengths;
701701

@@ -991,7 +991,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row_c)(MYSQLND_RES * result, void
991991
}
992992

993993
/* BEGIN difference between normal normal fetch and _c */
994-
*row = mnd_malloc(field_count * sizeof(char *));
994+
*row = mnd_emalloc(field_count * sizeof(char *));
995995
for (i = 0; i < field_count; ++i) {
996996
zval * data = &current_row[i];
997997

ext/pdo_mysql/mysql_statement.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */
106106

107107
#ifdef PDO_USE_MYSQLND
108108
if (!S->stmt && S->current_data) {
109-
mnd_free(S->current_data);
109+
mnd_efree(S->current_data);
110110
}
111111
#endif /* PDO_USE_MYSQLND */
112112

@@ -554,7 +554,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori
554554
}
555555

556556
if (!S->stmt && S->current_data) {
557-
mnd_free(S->current_data);
557+
mnd_efree(S->current_data);
558558
}
559559
#else
560560
int ret;

0 commit comments

Comments
 (0)