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) { if (dir >= 0) {
struct string prefix; struct string prefix;
init_string(&prefix); if (init_string(&prefix)) {
add_to_string(&prefix, url); add_to_string(&prefix, url);
add_char_to_string(&prefix, '/'); add_char_to_string(&prefix, '/');
smb_directory(dir, &prefix, conn->uri); smb_directory(dir, &prefix, conn->uri);
done_string(&prefix); done_string(&prefix);
}
} else { } else {
const int errno_from_opendir = errno; const int errno_from_opendir = errno;
char buf[READ_SIZE]; char buf[READ_SIZE];