-/* $OpenBSD: cmd-display-message.c,v 1.35 2015/12/14 00:31:54 nicm Exp $ */
+/* $OpenBSD: cmd-display-message.c,v 1.36 2016/08/25 09:33:14 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
msg = format_expand_time(ft, template, time(NULL));
if (args_has(self->args, 'p'))
cmdq_print(cmdq, "%s", msg);
- else
+ else if (c != NULL)
status_message_set(c, "%s", msg);
free(msg);
+
format_free(ft);
return (CMD_RETURN_NORMAL);