Page 1 of 1

Re: [Nagios-devel] [PATCH] core: Don't free the lock file path too

Posted: Wed May 22, 2013 8:04 am
by Guest
Will apply. Thanks.

On 2013-05-22 10:41, Robin Sonefors wrote:
> It's used after the main loop ends in the main function to remove the
> lock file once we're shut down.
>
> As the variable was already freed and pointed to NULL, unlink would not
> remove the lock file, but instead return EFAULT. This is not how daemons
> are supposed to behave.
>
> Signed-off-by: Robin Sonefors
> ---
> base/utils.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/base/utils.c b/base/utils.c
> index 5e038cb..362e683 100644
> --- a/base/utils.c
> +++ b/base/utils.c
> @@ -2902,7 +2902,6 @@ void free_memory(nagios_macros *mac) {
> my_free(command_file);
> mac->x[MACRO_COMMANDFILE] = NULL; /* assigned from command_file */
> my_free(log_archive_path);
> - my_free(lock_file);
>
> for (i = 0; i my_free(macro_user);
>


--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]