rem: if (pid_fn) { unlink(pid_fn); free(pid_fn);
add: if (pid_file) { unlink(pid_file);
context: static void sig_usr(int signo){	pid_t	chld;	int	chld_status;	if (signo==SIGINT || signo==SIGPIPE) {	/* exit gracefuly */		DPrint("INT received, program terminates\n");#		ifdef STATS		/* print statistics on exit only for the first process */		if (stats->process_index==0 && stat_file )			if (dump_all_statistic()==0)				printf("statistic dumped to %s\n", stat_file );			else				printf("statistics dump to %s failed\n", stat_file );#		endif		/* WARNING: very dangerous, might be unsafe*/		if (is_main)			destroy_modules();#ifdef PKG_MALLOC		LOG(L_INFO, "Memory status (pkg):\n");		pkg_status();#		endif#ifdef SHM_MEM		if (is_main){			LOG(L_INFO, "Memory status (shm):\n");			shm_status();			/*zero all shmem  alloc vars, that will still use*/			pids=0;			shm_mem_destroy();		}#endif		dprint("Thank you for flying " NAME "\n");		exit(0);	} else if (signo==SIGTERM) { /* exit gracefully as daemon */		DPrint("TERM received, program terminates\n");		if (is_main){#ifdef STATS			dump_all_statistic();#endif			if (pid_fn) {				unlink(pid_fn);				free(pid_fn);			}		}		exit(0);	} else if (signo==SIGUSR1) { /* statistic */#ifdef STATS		dump_all_statistic();#endif#ifdef PKG_MALLOC		LOG(L_INFO, "Memory status (pkg):\n");		pkg_status();#endif#ifdef SHM_MEM		LOG(L_INFO, "Memory status (shm):\n");		shm_status();#endif	} else if (signo==SIGCHLD) {		while ((chld=waitpid( -1, &chld_status, WNOHANG ))>0) {			if (WIFEXITED(chld_status)) 				LOG(L_INFO, "child process %d exited normally, status=%d\n",					chld, WEXITSTATUS(chld_status));			else if (WIFSIGNALED(chld_status)) {				LOG(L_INFO, "child process %d exited by a signal %d\n",					chld, WTERMSIG(chld_status));#				ifdef WCOREDUMP				LOG(L_INFO, "core was %sgenerated\n", WCOREDUMP(chld_status) ?					"" : "not" );#				endif			} else if (WIFSTOPPED(chld_status)) 				LOG(L_INFO, "child process %d stopped by a signal %d\n",					chld, WSTOPSIG(chld_status));		}	}}