windows: do not dinamically allocate info->lfilename.

This commit is contained in:
Giuseppe Scrivano 2014-06-19 19:57:25 +02:00
parent 8445279306
commit ca402e2f81
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2014-06-19 Giuseppe Scrivano <gscrivan@redhat.com>
* mswindows.c (fake_fork_child): Revert dinamic allocation of
info->lfilename.
Reported by: Gisle Vanem <gvanem@yahoo.no>.
2014-06-16 Darshit Shah <darnir@gmail.com>
* test.c: Include locale.h header for gettext.

View File

@ -123,7 +123,7 @@ struct fake_fork_info
{
HANDLE event;
bool logfile_changed;
char *lfilename;
char lfilename[MAX_PATH + 1];
};
/* Determines if we are the child and if so performs the child logic.
@ -165,7 +165,7 @@ fake_fork_child (void)
if (new_log_fp)
{
info->logfile_changed = true;
info->lfilename = strdup (opt.lfilename);
snprintf (info->filename, sizeof (info->lfilename), "%s", opt.lfilename);
fclose (new_log_fp);
}
}