All of lore.kernel.org
 help / color / mirror / Atom feed
From: guido@trentalancia.com (Guido Trentalancia)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH v5] fc_sort: memory leakages
Date: Wed, 04 Oct 2017 22:59:31 +0200	[thread overview]
Message-ID: <1507150771.4555.2.camel@trentalancia.com> (raw)
In-Reply-To: <CAFftDdq1u_84v4xA2+3WeK00PUPwg3+SQfcH+_ced0dd+LG8rw@mail.gmail.com>

On Wed, 04/10/2017 at 11.05 -0700, William Roberts wrote:
> On Wed, Oct 4, 2017 at 2:41 AM, Guido Trentalancia via refpolicy
> <refpolicy@oss.tresys.com> wrote:
> > Hello Christopher.
> > 
> > The latest version (v5) has been tested not only with valgrind but
> > also with the Clang static analyzer and none of them reports any
> > error.
> > 
> > The Clang analyzer is the same one that was mentioned in the
> > original bug report, I have used the latest version 5.0.
> > 
> > I hope it helps.
> > 
> > Regards,
> > 
> > Guido
> > 
> > Il 03 ottobre 2017 03:21:38 CEST, Chris PeBenito <pebenito@ieee.org
> > > ha scritto:
> > > On 09/30/2017 06:44 PM, Guido Trentalancia via refpolicy wrote:
> > > > Avoid memory leakages in the fc_sort executable (now passes
> > > > all valgrind AND Clang static analyzer tests fine).
> > > > 
> > > > Some NULL pointer checks with or without associated error
> > > > reporting.
> > > > 
> > > > Some white space and comment formatting fixes.
> > > > 
> > > > Optimization: avoid unnecessary operations (unnecessary
> > > > memory allocation/deallocation and list copying).
> > > > 
> > > > Reverts 7821eb6f37d785ab6ac3bbdc39282c799ad22393 as such
> > > > trick is no longer needed, given that all memory leakages
> > > > have now been fixed.
> > > > 
> > > > This is the fifth version of this patch. Please do not use
> > > > the first version as it introduces a serious bug.
> > > > 
> > > > For reference, the original issue reported by the Cland
> > > > static analyzer is as follows:
> > > > 
> > > > support/fc_sort.c:494:6: warning: Potential leak of memory
> > > > pointed to by 'head'
> > > >              malloc(sizeof(file_context_bucket_t));
> > > 
> > > Bill, did your guys run this through their static analyzer? I'm
> > > inclined
> > > to merge this.

[...]

> 
> FYI Ill be on vacation for a week, so I won't be reachable on this
> matter. Thanks for the patch!
> 
> Bill

Thanks very much for reviewing it Bill ! I have now fixed the
whitespace as suggested by "git diff --check".

The new patch version will follow shortly...

Regards,

Guido

  reply	other threads:[~2017-10-04 20:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 16:05 [refpolicy] Pull Request for fixing memory leak warning William Roberts
2017-09-29  0:12 ` [refpolicy] [PATCH] fc_sort: memory leakages (was: Pull Request for fixing memory leak warning) Guido Trentalancia
2017-09-28 22:24   ` William Roberts
2017-09-29 16:52     ` Guido Trentalancia
2017-09-29 16:30       ` William Roberts
2017-09-29 18:43         ` Guido Trentalancia
2017-09-29 17:37           ` William Roberts
2017-09-29 23:29         ` Guido Trentalancia
2017-09-29 18:35       ` [refpolicy] [PATCH v2] fc_sort: memory leakages Guido Trentalancia
2017-09-29 23:30         ` [refpolicy] [PATCH v3] " Guido Trentalancia
2017-09-30  6:03           ` [refpolicy] [PATCH v4] " Guido Trentalancia
2017-09-30 19:15             ` Guido Trentalancia
2017-09-30 22:44               ` [refpolicy] [PATCH v5] " Guido Trentalancia
2017-10-03  1:21                 ` Chris PeBenito
2017-10-04  9:41                   ` Guido Trentalancia
2017-10-04 18:05                     ` William Roberts
2017-10-04 20:59                       ` Guido Trentalancia [this message]
2017-10-04 21:02                 ` [refpolicy] [PATCH v6] " Guido Trentalancia
2017-10-04 23:31                   ` Chris PeBenito

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=1507150771.4555.2.camel@trentalancia.com \
    --to=guido@trentalancia.com \
    --cc=refpolicy@oss.tresys.com \
    /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.