Fix memory leaks in command line parsing.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4821 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-09-19 15:21:06 +00:00
1 parent 4a5de7fb98
commit 5beebbb0bb
2 files changed
+5 -8

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ SVN HEAD
Program sensord: Fix f71805f fans
Syncronize the version with lm-sensors
Fix a memory leak when daemonizing
Fix memory leaks in command line parsing
Program sensors: Fix a memory leak on error (with -u)
Add sch311x support
Hide error on missing dme1737 fan and pwm
+4 -8
View File
@@ -212,24 +212,20 @@ parseArgs
doSet = 1;
break;
case 'c':
if ((sensorsCfgFile = strdup (optarg)) == NULL)
return -1;
sensorsCfgFile = optarg;
break;
case 'p':
if ((pidFile = strdup (optarg)) == NULL)
return -1;
pidFile = optarg;
break;
case 'r':
if ((rrdFile = strdup (optarg)) == NULL)
return -1;
rrdFile = optarg;
break;
case 'd':
debug = 1;
break;
case 'g':
doCGI = 1;
if ((cgiDir = strdup (optarg)) == NULL)
return -1;
cgiDir = optarg;
break;
case 'v':
printf ("sensord version %s\n", LM_VERSION);