Thank you for the bug submission. It will be fixed in the next release.
Kind regards
Michał Borychowski
MooseFS Support Manager
From: kuer ku [mailto:ku...@gm...]
Sent: Monday, March 22, 2010 7:35 AM
To: moo...@li...
Subject: [Moosefs-users] bug in mfscommon/main.c
hi, all,
some problem code in mfscommon/main.c ( still in version 1.6.14 ) :
596
597 int check_old_locks(FILE *msgfd,uint8_t runmode,uint32_t timeout) {
598 int lfp;
599 char str[13];
600 uint32_t l;
601 pid_t ptk;
602 char *lockfname;
603
604 lockfname = cfg_getstr("LOCK_FILE",RUN_PATH "/" STR(APPNAME)
".lock");
605 lfp=open(lockfname,O_RDWR);
606 if (lfp<0) {
607 free(lockfname);
^^^^^^^^^^^^^^^^^ WHY free locfname here ???
608 if (errno==ENOENT) { // no old lock file
609 return 0; // ok
610 }
611 syslog(LOG_ERR,"open %s error: %m",lockfname);
^^^^^^^^^^^^^^^^^ WHY refer
lockfname here ????
612 fprintf(msgfd,"open %s error: %s\n",lockfname,errno_to_str());
613 free(lockfname);
614 return -1;
615 }
|