Wireshark-bugs: [Wireshark-bugs] [Bug 7773] Explicitly assign pointers released by g_free() to N
Date: Sun, 30 Sep 2012 11:29:40 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7773

Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darkjames-ws@xxxxxxxxxxxx

--- Comment #1 from Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx> 2012-09-30 11:29:40 PDT ---
(In reply to comment #0)
> The files included in this tarball are patchfiles generated by 'diff -u' which
> explicitly set pointer variables released by a call to g_free() to NULL.
> 
> In most contexts, when a pointer is released via free, should not the following
> occur?
> [...]
>     free(p);
>     p = NULL;
> 
> Or am I mistaken in this issue?

It might be issue if you reuse variable several times, or use it as global
variable, but if you end variable scope with g_free, like:

     g_free(decoded_param);
+    decoded_param = NULL;
     return FALSE;

I don't see much sense to explicit set it to NULL, do you?

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.