[PATCH] vfree cleanup for sound/oss/sequencer.c

From: Jesper Juhl (juhl-lkml_at_dif.dk)
Date: 06/30/05

  • Next message: Jesper Juhl: "[PATCH] cleanup NULL pointer check before vfree in sound/oss/maestro3.c"
    Date:	Thu, 30 Jun 2005 22:28:27 +0200 (CEST)
    To: linux-kernel <linux-kernel@vger.kernel.org>
    
    

    Don't bother checking for NULL, vfree can handle it.

    Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>

    ---
     sound/oss/sequencer.c |   14 ++++----------
     1 files changed, 4 insertions(+), 10 deletions(-)
    --- linux-2.6.13-rc1-orig/sound/oss/sequencer.c	2005-06-17 21:48:29.000000000 +0200
    +++ linux-2.6.13-rc1/sound/oss/sequencer.c	2005-06-30 22:21:49.000000000 +0200
    @@ -1671,14 +1671,8 @@ void sequencer_init(void)
     
     void sequencer_unload(void)
     {
    -	if(queue)
    -	{
    -		vfree(queue);
    -		queue=NULL;
    -	}
    -	if(iqueue)
    -	{
    -		vfree(iqueue);
    -		iqueue=NULL;
    -	}
    +	vfree(queue);
    +	queue = NULL;
    +	vfree(iqueue);
    +	iqueue = NULL;
     }
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Jesper Juhl: "[PATCH] cleanup NULL pointer check before vfree in sound/oss/maestro3.c"

    Relevant Pages

    • Re: My Pet Peeve! A warning!
      ... never bother to even look at, as I never ever get the names of anyone whom I ... know to be close relatives researching the same names as myself (and they ... they are so don't bother) but I get pages of lists of Hot matches such as ... To unsubscribe from the list, ...
      (soc.genealogy.britain)
    • Re: OT: converting C to C++ : linkng problems
      ... Could it be that the symbols have subtle data-type incompatibility? ... void foo(); ... void foo; ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: For Gods sake... (was Re: Cannot start Xserver)
      ... In this context, it makes sense.. ... when the post is <void> .. ... code for his Nvidea card, which would leave his lengthy hundred ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: OT: Leet-speak WAS:[Help with Linux selection please?]
      ... >> I disagree. ... Simply put if someone cannot bother to put some ... > *proper* natural languages? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: Testing something out - MAX, (Maximum) MIN (Minimum) & AVG (Average)... blah, blah, blah
      ... You have a *real* problem, bordering on the obsessive, with the AVG ... Update posts, don't you? ... If they bother you *that* much, maybe you should unsubscribe from this ...
      (uk.people.silversurfers)