[PATCH] vfree can handle NULL (sound/oss/msnd.c)

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

  • Next message: Ingo Molnar: "Re: Real-Time Preemption, -RT-2.6.12-final-V0.7.50-37"
    Date:	Thu, 30 Jun 2005 22:39:01 +0200 (CEST)
    To: linux-kernel@vger.kernel.org
    
    

    Nothing wrong in handing vfree a NULL pointer.

     sound/oss/msnd.c | 6 ++----
     1 files changed, 2 insertions(+), 4 deletions(-)

    --- linux-2.6.13-rc1-orig/sound/oss/msnd.c 2005-06-17 21:48:29.000000000 +0200
    +++ linux-2.6.13-rc1/sound/oss/msnd.c 2005-06-30 22:35:41.000000000 +0200
    @@ -96,10 +96,8 @@ void msnd_fifo_init(msnd_fifo *f)
     
     void msnd_fifo_free(msnd_fifo *f)
     {
    - if (f->data) {
    - vfree(f->data);
    - f->data = NULL;
    - }
    + vfree(f->data);
    + f->data = NULL;
     }
     
     int msnd_fifo_alloc(msnd_fifo *f, size_t n)

    -
    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: Ingo Molnar: "Re: Real-Time Preemption, -RT-2.6.12-final-V0.7.50-37"

    Relevant Pages

    • Re: Screen Lock & Locate Pointer
      ... I not sure if this is a bug or not, but when I activate the the ... Control key to show the position of were the mouse pointer is on the ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Screen Lock & Locate Pointer
      ... Control key to show the position of were the mouse pointer is on the ... I have noticed that when this is activated the Lock Screen ... the 'Locate Pointer' key binding but that seems to be hard coded some ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • X has lost Ctrl+Alt+Keypad-Plus/Minus
      ... It's still possible to switch modes with gvidm but if you move the ... the view port would scroll to follow the pointer. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Mouse not syncd with pointer
      ... I just installed Lenny in a VMware Player virtual machine and the pointer does not match up with ... There is a x and y offset from where the mouse x-y is and where the desktop ... What do I do to get the pointer to be placed where the mouse coordinates are? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • xorg.conf for vesa
      ... Controller is expanding. ... A mouse pointer is no longer visible. ... vesa driver is used rather than the current default driver. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)