diff options
author | Nuno Lopes <nlopess@php.net> | 2008-12-12 23:46:05 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2008-12-12 23:46:05 +0000 |
commit | f2f7ed49871275f89a049d5628e7f95a1b6bb4c1 (patch) | |
tree | f17b990d43bdda3dd134a1384144c8b64bd7eb1d /ext/pdo | |
parent | 7c910b94cf7fdd76b76206e9afb7818286cc67a0 (diff) | |
download | php-git-f2f7ed49871275f89a049d5628e7f95a1b6bb4c1.tar.gz |
we do not need the strndup() now that php_stream_printf() handles non-null terminated strings correctly
Diffstat (limited to 'ext/pdo')
-rwxr-xr-x | ext/pdo/pdo_stmt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 4566312d14..f82261f6a8 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2209,9 +2209,7 @@ static PHP_METHOD(PDOStatement, debugDumpParams) if (res == HASH_KEY_IS_LONG) { php_stream_printf(out TSRMLS_CC, "Key: Position #%ld:\n", num); } else if (res == HASH_KEY_IS_STRING) { - char *s = estrndup(str, len); - php_stream_printf(out TSRMLS_CC, "Key: Name: [%d] %.*s\n", len, len, s); - efree(s); + php_stream_printf(out TSRMLS_CC, "Key: Name: [%d] %.*s\n", len, len, str); } php_stream_printf(out TSRMLS_CC, "paramno=%d\nname=[%d] \"%.*s\"\nis_param=%d\nparam_type=%d\n", |