summaryrefslogtreecommitdiff
path: root/client/mysql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysql.cc')
-rw-r--r--client/mysql.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index fa824d598e6..394d4dca3d0 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1795,8 +1795,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case OPT_MYSQL_PROTOCOL:
#ifndef EMBEDDED_LIBRARY
- opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
- opt->name);
+ if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
+ opt->name)) <= 0)
+ {
+ sf_leaking_memory= 1; /* no memory leak reports here */
+ exit(1);
+ }
#endif
break;
case OPT_SERVER_ARG: