command: fix leak when executing commands

found via valgrind, not observed/reported.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
Øyvind Harboe 2011-03-27 23:50:53 +02:00
parent dec80e1cff
commit 68bd107c6d

View File

@ -723,6 +723,7 @@ int command_run_linef(struct command_context *context, const char *format, ...)
if (string != NULL)
{
retval = command_run_line(context, string);
free(string);
}
va_end(ap);
return retval;