diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-01-29 13:50:26 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-03-10 19:24:22 +0100 |
commit | 7c58e97bf6f80a251046c5b3e7bce826fe058bd6 (patch) | |
tree | 7d32d26b320cf83296ee0ede2ea164ad116c4de8 /mysys/my_getopt.c | |
parent | 2ac3121af2767186c489054db5d4871d04b8eef4 (diff) | |
download | mariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz |
perfschema memory related instrumentation changes
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r-- | mysys/my_getopt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 9ebf63bf6ef..5576c8b5d5d 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -15,11 +15,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#include <my_global.h> +#include <mysys_priv.h> #include <my_default.h> #include <m_string.h> #include <stdlib.h> -#include <my_sys.h> #include <mysys_err.h> #include <my_getopt.h> #include <errno.h> @@ -754,7 +753,8 @@ static int setval(const struct my_option *opts, void *value, char *argument, break; case GET_STR_ALLOC: my_free(*((char**) value)); - if (!(*((char**) value)= my_strdup(argument == enabled_my_option ? "" : + if (!(*((char**) value)= my_strdup(key_memory_defaults, + argument == enabled_my_option ? "" : argument, MYF(MY_WME)))) { res= EXIT_OUT_OF_MEMORY; @@ -1343,7 +1343,7 @@ static void init_one_value(const struct my_option *option, void *variable, { char **pstr= (char **) variable; my_free(*pstr); - *pstr= my_strdup((char*) (intptr) value, MYF(MY_WME)); + *pstr= my_strdup(key_memory_defaults, (char*) (intptr) value, MYF(MY_WME)); } break; default: /* dummy default to avoid compiler warnings */ |