diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2016-09-05 13:18:04 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2016-09-05 13:18:04 +0200 |
commit | 213765cc222139c05c27774e0555cabeff7c3bbd (patch) | |
tree | da1e5de4e3cfd34cc081a9f9dfc7a4f53922b284 /storage/connect/json.cpp | |
parent | a2934d2710d24c20ec205007bdad2495a492ad83 (diff) | |
download | mariadb-git-213765cc222139c05c27774e0555cabeff7c3bbd.tar.gz |
- Fix MDEV-10496. Memory leak in discovery
modified: storage/connect/ha_connect.cc
modified: storage/connect/mycat.cc
- Fix wrong lrecl calculation for virtual columns
modified: storage/connect/reldef.cpp
- Typo
modified: storage/connect/jdbconn.cpp
modified: storage/connect/json.cpp
Diffstat (limited to 'storage/connect/json.cpp')
-rw-r--r-- | storage/connect/json.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp index 75bf277b25b..c45630129f1 100644 --- a/storage/connect/json.cpp +++ b/storage/connect/json.cpp @@ -595,7 +595,7 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, char *fn, int pretty) fputs(EL, fs); fclose(fs); str = (err) ? NULL : strcpy(g->Message, "Ok"); - } else if (!err) { + } else if (!err) { str = ((JOUTSTR*)jp)->Strp; jp->WriteChr('\0'); PlugSubAlloc(g, NULL, ((JOUTSTR*)jp)->N); @@ -767,7 +767,7 @@ bool JOUTSTR::Escape(const char *s) { WriteChr('"'); - for (unsigned int i = 0; i < strlen(s); i++) + for (unsigned int i = 0; s[i]; i++) switch (s[i]) { case '"': case '\\': @@ -816,7 +816,7 @@ bool JOUTFILE::Escape(const char *s) // This is temporary fputc('"', Stream); - for (unsigned int i = 0; i < strlen(s); i++) + for (unsigned int i = 0; s[i]; i++) switch (s[i]) { case '"': fputs("\\\"", Stream); break; case '\\': fputs("\\\\", Stream); break; |