diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-02-11 05:48:10 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-02-12 03:05:08 +0900 |
commit | b3f9c17a6b361bf98e79a0228cdcb09afc40d1cc (patch) | |
tree | 1c607970840370d1588f41eb5e6387a240e08661 /src/mount | |
parent | 7fb1d980aff8b035d96a34bd30efff261f3a5494 (diff) | |
download | systemd-b3f9c17a6b361bf98e79a0228cdcb09afc40d1cc.tar.gz |
tree-wide: use free_and_strdup_warn()
Diffstat (limited to 'src/mount')
-rw-r--r-- | src/mount/mount-tool.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 39e67b57f8..8b6fc520c5 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -241,13 +241,15 @@ static int parse_argv(int argc, char *argv[]) { break; case 't': - if (free_and_strdup(&arg_mount_type, optarg) < 0) - return log_oom(); + r = free_and_strdup_warn(&arg_mount_type, optarg); + if (r < 0) + return r; break; case 'o': - if (free_and_strdup(&arg_mount_options, optarg) < 0) - return log_oom(); + r = free_and_strdup_warn(&arg_mount_options, optarg); + if (r < 0) + return r; break; case ARG_OWNER: { @@ -271,8 +273,9 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_DESCRIPTION: - if (free_and_strdup(&arg_description, optarg) < 0) - return log_oom(); + r = free_and_strdup_warn(&arg_description, optarg); + if (r < 0) + return r; break; case 'p': |