smb3: missing null check in SMB2_change_notify
[platform/kernel/linux-rpi.git] / fs / smb / client / smb2pdu.c
index 9ed61b6..7063b39 100644 (file)
@@ -3725,7 +3725,7 @@ SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon,
                if (*out_data == NULL) {
                        rc = -ENOMEM;
                        goto cnotify_exit;
-               } else
+               } else if (plen)
                        *plen = le32_to_cpu(smb_rsp->OutputBufferLength);
        }