Fix allow empty passphrases in unlock

Fixes issues https://github.com/koverstreet/bcachefs-tools/issues/314
This commit is contained in:
Matthias Goergens 2024-07-23 14:26:07 +08:00
parent 57cd58db1e
commit 134bdf622f

View File

@ -124,10 +124,6 @@ char *read_file_str(int dirfd, const char *path)
buf[len] = '\0';
if (len && buf[len - 1] == '\n')
buf[len - 1] = '\0';
if (!strlen(buf)) {
free(buf);
buf = NULL;
}
close(fd);