summaryrefslogtreecommitdiff
path: root/client/mysqladmin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqladmin.cc')
-rw-r--r--client/mysqladmin.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 57feed163ad..10026cfaacf 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -1198,6 +1198,9 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
static char **mask_password(int argc, char ***argv)
{
char **temp_argv;
+ if (!argc)
+ return NULL;
+
temp_argv= (char **)(my_malloc(sizeof(char *) * argc, MYF(MY_WME)));
argc--;
while (argc > 0)