diff options
author | Andrey Hristov <andrey@php.net> | 2010-06-01 14:16:27 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-06-01 14:16:27 +0000 |
commit | c7831cbe27260111c8a81dc7e381a88267504724 (patch) | |
tree | 636c87c5e52489e4933065f0d8e3f845d306adfb /ext/mysqli/mysqli_api.c | |
parent | 0ed3973331b73a2c7dbdaabcbf16c33a1257ce36 (diff) | |
download | php-git-c7831cbe27260111c8a81dc7e381a88267504724.tar.gz |
defensive programming, check before using a resource
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-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 690d6f0bcd..fc3a72e49b 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -167,6 +167,9 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in return PASS; } params = mysqlnd_stmt_alloc_param_bind(stmt->stmt); + if (!params) { + goto end; + } for (i = 0; i < (argc - start); i++) { zend_uchar type; switch (types[i]) { |