Menu

#137 shouldn't it be freez?

None
closed-rejected
Lee
None
5
2016-07-25
2016-07-22
Lee
No

think the change from free -> freez missed one

1 Attachments

Related

Patches: #137

Discussion

  • Fabian Keil

    Fabian Keil - 2016-07-23

    I don't see the point, the pointer is already cleared by
    the memset() in the next line, together with the rest of
    the struct members.

     
    • Lee

      Lee - 2016-07-23

      On 7/23/16, Fabian Keil fabiankeil@users.sf.net wrote:

      I don't see the point, the pointer is already cleared by
      the memset() in the next line, together with the rest of
      the struct members.

      I thought point of freez was making sure you don't do a free(0)
      That and consistency; didn't you change most of the "free(xxx)" calls
      to "freez(xxx)"?

      Lee


      ** [patches:#137] shouldn't it be freez?**

      Status: open
      Group:
      Created: Fri Jul 22, 2016 04:07 PM UTC by Lee
      Last Updated: Fri Jul 22, 2016 04:07 PM UTC
      Owner: nobody
      Attachments:

      -
      freez.patch (sourceforge.net)
      (484 Bytes; application/octet-stream)

      think the change from free -> freez missed one


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/ijbswa/patches/137/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Patches: #137

      • Fabian Keil

        Fabian Keil - 2016-07-24

        The main point of freez is to prevent double frees
        and to let Privoxy crash sooner if freed memory is
        accessed (thus making debugging easier).

        In this case, the memset() already takes care of that.

        free(0) is supposed to be nop and the NULL check currently
        done by freez is a micro "optimization" which is probably
        pointless on all platforms Privoxy runs on.

        While I replaced some free()s with freez() in the past,
        I didn't intend to change most of them and probably
        didn't (there seem to be 164 free() occurrences left).

         
  • Lee

    Lee - 2016-07-25
    • status: open --> closed-rejected
    • assigned_to: Lee
    • Group: -->
     
  • Lee

    Lee - 2016-07-25

    closed - wontfix
    free(0) just returns instead of crashing so there's no reason to change this free to freez

     

Log in to post a comment.

MongoDB Logo MongoDB