From: Ahmed Tamrawi <ahmedtamrawi@gmail.com>
To: netdev@vger.kernel.org
Subject: Possible memory leak in function (r8712_setrttbl_cmd) not freeing pointer (ph2c) on error path
Date: Sun, 30 Nov 2014 19:06:20 -0600 [thread overview]
Message-ID: <CAFZT-jJ=g9Nbzybf1tgNe4bBUi-Xt-dmtsAzoME9V-Dnf76j_A@mail.gmail.com> (raw)
Bug Report Filed: https://bugzilla.kernel.org/show_bug.cgi?id=88881
Linux Version [3.17-rc1]
Configuration: Default configuration for x86
In function (r8712_setrttbl_cmd) file (drivers/staging/rtl8712/rtl871x_cmd.c):
Function (r8712_setrttbl_cmd) allocates the variable (ph2c) at line
732 and passes it as a parameter to function (r8712_enqueue_cmd) at
line 743. Function (r8712_setrttbl_cmd) returns (_SUCCESS) result
regardless of the result of the called function (r8712_enqueue_cmd)
which may return (_FAIL) at line 176. This failure causing the
allocated object not to be queued and hence not freed later. Thus,
causing a possible memory leak not freeing the (ph2c) pointer upon
(_FAIL) return of function (r8712_enqueue_cmd).
Source code reference for function (r8712_setrttbl_cmd):
http://lxr.free-electrons.com/source/drivers/staging/rtl8712/rtl871x_cmd.c#L725
Source code reference for function (r8712_enqueue_cmd):
http://lxr.free-electrons.com/source/drivers/staging/rtl8712/rtl871x_cmd.c#L171
~Ahmed
next reply other threads:[~2014-12-01 1:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 1:06 Ahmed Tamrawi [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-11-25 14:24 Possible memory leak in function (r8712_setrttbl_cmd) not freeing pointer (ph2c) on error path Ahmed Tamrawi
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='CAFZT-jJ=g9Nbzybf1tgNe4bBUi-Xt-dmtsAzoME9V-Dnf76j_A@mail.gmail.com' \
--to=ahmedtamrawi@gmail.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).