autofs-5.0.3 - fix incorrect if check in get user info From: Ian Kent Fix an if statement checking the wrong value in the get user info code. --- daemon/direct.c | 2 +- daemon/indirect.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/direct.c b/daemon/direct.c index 98590ec..072ef97 100644 --- a/daemon/direct.c +++ b/daemon/direct.c @@ -1337,7 +1337,7 @@ static void *do_mount_direct(void *arg) } tsv->home = strdup(pw.pw_dir); - if (!tsv->user) { + if (!tsv->home) { error(ap->logopt, "failed to malloc buffer for home"); free(pw_tmp); free(tsv->user); diff --git a/daemon/indirect.c b/daemon/indirect.c index 9f22ec9..ccdd8bf 100644 --- a/daemon/indirect.c +++ b/daemon/indirect.c @@ -768,7 +768,7 @@ static void *do_mount_indirect(void *arg) } tsv->home = strdup(pw.pw_dir); - if (!tsv->user) { + if (!tsv->home) { error(ap->logopt, "failed to malloc buffer for home"); free(pw_tmp); free(tsv->user);