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:
parent
d60bdd0fad
commit
b0b0fef12a
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user