rtcwake: do not duplicate argument strings
This is not necessary and prevents memory leaks. Reported-by: Marek Otahal <markotahal@gmail.com> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
This commit is contained in:
parent
4b5f7895b4
commit
c1196d3ab7
|
@ -398,7 +398,7 @@ int main(int argc, char **argv)
|
|||
break;
|
||||
|
||||
case 'd':
|
||||
devname = strdup(optarg);
|
||||
devname = optarg;
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
|
@ -423,7 +423,7 @@ int main(int argc, char **argv)
|
|||
|| strcmp(optarg, "disable") == 0
|
||||
|| strcmp(optarg, "show") == 0
|
||||
) {
|
||||
suspend = strdup(optarg);
|
||||
suspend = optarg;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue