main: use strdup instead of free_and_strdup to initialize default unit (#4335)
author0xAX <0xAX@users.noreply.github.com>
Mon, 10 Oct 2016 20:11:36 +0000 (23:11 +0300)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 Oct 2016 20:11:36 +0000 (22:11 +0200)
commitf6dd106c73abb33af5eb0aaeffcddd11724515e6
treeccf8d8c2e1d24d24aac308a0e0be26ad08b1d343
parent53c06862c12918ec717ea70918039765212eee95
main: use strdup instead of free_and_strdup to initialize default unit (#4335)

Previously we've used free_and_strdup() to fill arg_default_unit with unit
name, If we didn't pass default unit name through a kernel command line or
command line arguments. But we can use just strdup() instead of
free_and_strdup() for this, because we will start fill arg_default_unit
only if it wasn't set before.
src/core/main.c