1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[smb] check return value of init_string

This commit is contained in:
Witold Filipczyk 2022-01-04 17:28:22 +01:00
parent d60bdd0fad
commit b0b0fef12a

View File

@ -303,11 +303,12 @@ do_smb(struct connection *conn)
if (dir >= 0) {
struct string prefix;
init_string(&prefix);
if (init_string(&prefix)) {
add_to_string(&prefix, url);
add_char_to_string(&prefix, '/');
smb_directory(dir, &prefix, conn->uri);
done_string(&prefix);
}
} else {
const int errno_from_opendir = errno;
char buf[READ_SIZE];