diff options
author | Remi Collet <remi@remirepo.net> | 2019-07-23 14:04:21 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-07-23 14:04:21 +0200 |
commit | 6af2375411860aa6fb2ecc43899c3099864595d0 (patch) | |
tree | 4dac46e23754b16c81ca0f539affdc52728c7bf2 /65.patch | |
parent | ad2b662a6466983c6749dda81d22af943995351d (diff) |
rebuild for 7.4.0beta1
Diffstat (limited to '65.patch')
-rw-r--r-- | 65.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/65.patch b/65.patch new file mode 100644 index 0000000..43fed80 --- /dev/null +++ b/65.patch @@ -0,0 +1,42 @@ +From d3afedb016aa319246177a3c516ca4804f08dd45 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 22 Feb 2019 15:19:18 +0100 +Subject: [PATCH] fix string free + +--- + .gitignore | 2 ++ + smbclient.c | 6 ++++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/smbclient.c b/smbclient.c +index 81ebd5a..faeb505 100644 +--- a/smbclient.c ++++ b/smbclient.c +@@ -1345,15 +1345,17 @@ PHP_FUNCTION(smbclient_read) + + if ((ZSTR_LEN(buf) = smbc_read(state->ctx, file, ZSTR_VAL(buf), count)) >= 0) { + RETURN_STR(buf); ++ } ++ zend_string_release(buf); + #else + void *buf = emalloc(count); + ssize_t nbytes; + + if ((nbytes = smbc_read(state->ctx, file, buf, count)) >= 0) { + RETURN_STRINGL(buf, nbytes, 0); +-#endif + } + efree(buf); ++#endif + switch (state->err = errno) { + case EISDIR: php_error(E_WARNING, "Read error: Is a directory"); break; + case EBADF: php_error(E_WARNING, "Read error: Not a valid file resource or not open for reading"); break; +@@ -1738,7 +1740,7 @@ PHP_FUNCTION(smbclient_removexattr) + PHP_FUNCTION(smbclient_option_get) + { + zend_long option; +- char *ret; ++ const char *ret; + zval *zstate; + php_smbclient_state *state; + |