summaryrefslogtreecommitdiff
path: root/src/run/run.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/run/run.c')
-rw-r--r--src/run/run.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/run/run.c b/src/run/run.c
index 148854a9b5..3dd97022de 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -1129,13 +1129,9 @@ int main(int argc, char* argv[]) {
}
if (arg_unit && isempty(description)) {
- free(description);
- description = strdup(arg_unit);
-
- if (!description) {
- r = log_oom();
+ r = free_and_strdup(&description, arg_unit);
+ if (r < 0)
goto finish;
- }
}
arg_description = description;