another leak in mistake()

This commit is contained in:
Enno Rehling 2006-01-02 22:41:36 +00:00
parent 2ddc4ac9c2
commit 68389e2ba6

View file

@ -360,9 +360,8 @@ void
mistake(const unit * u, struct order * ord, const char *comment, int mtype) mistake(const unit * u, struct order * ord, const char *comment, int mtype)
{ {
if (u->faction->no != MONSTER_FACTION) { if (u->faction->no != MONSTER_FACTION) {
char * cmt = strdup(comment);
ADDMSG(&u->faction->msgs, msg_message("mistake", ADDMSG(&u->faction->msgs, msg_message("mistake",
"command error unit region", ord, cmt, u, u->region)); "command error unit region", ord, comment, u, u->region));
} }
} }