We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bce7c0a + 62b5e81 commit bb12c1bCopy full SHA for bb12c1b
fs/smb/client/fs_context.c
@@ -918,8 +918,15 @@ static int smb3_reconfigure(struct fs_context *fc)
918
else {
919
kfree_sensitive(ses->password);
920
ses->password = kstrdup(ctx->password, GFP_KERNEL);
921
+ if (!ses->password)
922
+ return -ENOMEM;
923
kfree_sensitive(ses->password2);
924
ses->password2 = kstrdup(ctx->password2, GFP_KERNEL);
925
+ if (!ses->password2) {
926
+ kfree_sensitive(ses->password);
927
+ ses->password = NULL;
928
929
+ }
930
}
931
STEAL_STRING(cifs_sb, ctx, domainname);
932
STEAL_STRING(cifs_sb, ctx, nodename);
0 commit comments