Or there will be memory leak.
2015-02-02 Chen Gang <gang.chen.5i5j@gmail.com>
* microblaze/interp.c (sim_do_command): Call freeargv() before
return.
+2015-02-02 Chen Gang <gang.chen.5i5j@gmail.com>
+
+ * microblaze/interp.c (sim_do_command): Call freeargv() before
+ return.
+
2015-02-02 Chen Gang <gang.chen.5i5j@gmail.com>
* mcore/interp.c (sim_do_command): Call freeargv() before return.
if ((simargv[1] == NULL) || (simargv[2] == NULL))
{
fprintf (stderr, "Error: missing argument to watch cmd.\n");
+ freeargv (simargv);
return;
}
fprintf (stderr,"Error: \"%s\" is not a valid M.CORE simulator command.\n",
cmd);
}
+
+ freeargv (simargv);
}
else
{