[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: No xterm window by default?
      ... When I run startx I get a gray background with an X in the middle (mouse pointer). ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • Re: How do I change cursor/mouse pointer?
      ... thank you for that pointer because that is nowhere near intuitive! ... Because that is the first thing I tried, then man -k cursor, then info big-cursor. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • How do I change cursor/mouse pointer?
      ... I am running gnome and a hi-res screen. ... My cursor and mouse pointer are too small to see easily on the screen. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • Re: /tmp on tmpfs with selinux enabled
      ... > Many thanks for the pointer to that thread on fedora-selinux list. ... > was extremely helpfull. ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ...
      (Fedora)
    • Re: X pointer problem
      ... Thomas Adam wrote: ... >>the theme changed the mouse pointer so as to look similar to in OS X. ... Anybody with money to burn will easily find someone to tend the fire. ... To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org ...
      (Debian-User)