From: Erwan Velu <erwan@enovance.com>
To: fio@vger.kernel.org
Subject: Potential leaks & errors on current trunk
Date: Tue, 17 Feb 2015 16:00:24 +0100 [thread overview]
Message-ID: <54E35788.2000400@enovance.com> (raw)
I've been playing with clang 3.3 on
495288a1e627c3d1b29897786b786eb6008841a3 and found the following items
interesting.
Before making any PR, I'd like your insights on them.
http://git.kernel.dk/?p=fio.git;a=blob;f=filesetup.c;h=0fb5589b7c33ce1aa154c21ecf42cf52a682c4d8;hb=HEAD#l424
On that part of the code, it's not clear for me if we want to return ret
or always 0.
So we have to remove ret=0 _or_ change to return ret;
As some code is considering that __file_invalidate_cache can be
different from 0, I think it's the latter case.
http://git.kernel.dk/?p=fio.git;a=blob;f=client.c;h=760ec85087b73bba197c95b033154f08c245bc7f;hb=HEAD#l1572
We have an issue on this dprint as it use eta that I've been freed in
fio_client_dec_jobs_eta().
So using dprint could lead to a very weird message print here.
Shall we keep that dprint which could be buggy ? If we still want it,
that would mean put extra variable to save the required info for
printing it.
http://git.kernel.dk/?p=fio.git;a=blob;f=iolog.c;h=99f8bc18d8694cca0c141c51d116aced1b4130f2;hb=HEAD#l863
In that function, if we do return 1 we do leak ic.buf, we shall free it
before the return
http://git.kernel.dk/?p=fio.git;a=blob;f=lib/axmap.c;h=164300f254014b10ed6e04e3e06b7263aa917aac;hb=HEAD#l127
Here, we surely miss the free of the axmap. We did free its internal
structure but not axmap itself.
Erwan Velu,
--
eNovance from Redhat
next reply other threads:[~2015-02-17 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 15:00 Erwan Velu [this message]
2015-02-18 18:36 ` Potential leaks & errors on current trunk Jens Axboe
2015-02-18 19:54 ` Andrey Kuzmin
2015-02-18 20:28 ` Jens Axboe
2015-02-19 12:17 ` Erwan Velu
2015-02-19 16:48 ` Jens Axboe
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=54E35788.2000400@enovance.com \
--to=erwan@enovance.com \
--cc=fio@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 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.