summaryrefslogtreecommitdiff
path: root/src/run/run.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2015-07-30 13:22:15 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2015-07-30 13:22:15 +0200
commit9e248507182e8e89891d45d1e27d0830e1def279 (patch)
treec662c5bf209dae93822ac07a831882a7ba4ba0b2 /src/run/run.c
parent5f17089ac1e86c25806d3f066243561360efd2ca (diff)
parent2fc09a9cdd1ad25bc7c53a23d5301eb952e1ce3d (diff)
Merge pull request #785 from zonque/free-and-strdup
tree-wide: use free_and_strdup()
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;