diff --git a/CHANGES b/CHANGES index 5974c54e..d62c45fa 100644 --- a/CHANGES +++ b/CHANGES @@ -56,6 +56,7 @@ SVN HEAD Program sensord: Syncronize the version with lm-sensors Drop all the chip-specific support Fix a memory leak when daemonizing + Fix memory leaks in command line parsing Program sensors: Drop all the chip-specific support Fix alignment of alarm for one-limit temperatures Drop option -U diff --git a/prog/sensord/args.c b/prog/sensord/args.c index d2278259..a492fc8b 100644 --- a/prog/sensord/args.c +++ b/prog/sensord/args.c @@ -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);