tree-wide: use free_and_strdup()

Use free_and_strdup() where appropriate and replace equivalent,
open-coded versions.
This commit is contained in:
Daniel Mack
2015-07-30 13:09:01 +02:00
parent 5f17089ac1
commit 2fc09a9cdd
10 changed files with 40 additions and 59 deletions
+2 -3
View File
@@ -503,9 +503,8 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'u':
free(arg_user);
arg_user = strdup(optarg);
if (!arg_user)
r = free_and_strdup(&arg_user, optarg);
if (r < 0)
return log_oom();
break;