Commit 588c225b 588c225b3eb45872f7978c0d7e3d79cdd397a933 by Sergey Poznyakoff

Fix memory allocation

1 parent 3f1703cb
......@@ -121,9 +121,8 @@ list_ref (char const *ref, char const *wcard, char const *cwd,
rc = mu_folder_create (&folder, cwd);
if (rc)
{
return RESP_NO;
}
return RESP_NO;
/* Force the right matcher */
mu_folder_set_match (folder, mu_folder_imap_match);
......
......@@ -503,7 +503,7 @@ com_connect (int argc, char **argv)
else
{
connect_argc = argc;
connect_argv = mu_calloc (argc, sizeof (*connect_argv));
connect_argv = mu_calloc (argc + 1, sizeof (*connect_argv));
for (i = 0; i < argc; i++)
connect_argv[i] = mu_strdup (argv[i]);
connect_argv[i] = NULL;
......
......@@ -237,7 +237,7 @@ com_connect (int argc, char **argv)
else
{
connect_argc = argc;
connect_argv = mu_calloc (argc, sizeof (*connect_argv));
connect_argv = mu_calloc (argc + 1, sizeof (*connect_argv));
for (i = 0; i < argc; i++)
connect_argv[i] = mu_strdup (argv[i]);
connect_argv[i] = NULL;
......