From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
Subject: re: cifs: Split lanman auth from CIFS_SessSetup()
Date: Mon, 7 Jul 2014 14:41:26 +0300 [thread overview]
Message-ID: <20140707114126.GA21109@mwanda> (raw)
Hello Sachin Prabhu,
The patch 4b26c7b1fc36: "cifs: Split lanman auth from
CIFS_SessSetup()" from Jun 16, 2014, leads to the following static
checker warning:
fs/cifs/sess.c:797 CIFS_SessSetup()
warn: possible memory leak of 'sess_data'
fs/cifs/sess.c
784 sess_data = kzalloc(sizeof(struct sess_data), GFP_KERNEL);
785 if (!sess_data)
786 return -ENOMEM;
787 sess_data->xid = xid;
788 sess_data->ses = ses;
789 sess_data->buf0_type = CIFS_NO_BUFFER;
790 sess_data->nls_cp = (struct nls_table *) nls_cp;
791
792 type = select_sectype(ses->server, ses->sectype);
793 cifs_dbg(FYI, "sess setup type %d\n", type);
794 if (type == Unspecified) {
795 cifs_dbg(VFS,
796 "Unable to select appropriate authentication method!");
797 return -EINVAL;
^^^^^^^^^^^^^^
missing kfree().
798 }
regards,
dan carpenter
next reply other threads:[~2014-07-07 11:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 11:41 Dan Carpenter [this message]
2014-07-14 16:02 ` cifs: Split lanman auth from CIFS_SessSetup() Sachin Prabhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140707114126.GA21109@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
--cc=sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.