Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] [Patch] Add = NULL after frees
Home

[Freeciv-Dev] [Patch] Add = NULL after frees

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [Patch] Add = NULL after frees
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Feb 2002 15:36:28 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

The attached patch adds "x = NULL;" after a "free(x);". This should
prevent wrongly dereferencing of the pointer. I didn't add this if it
is obvious that the pointer is set to a new value with no use in
between or is not used anymore at all.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Any sufficiently advanced technology is indistinguishable from magic."
    -- Arthur C. Clarke

Attachment: free_NULL1.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [Patch] Add = NULL after frees, Raimar Falke <=