[Libwebsockets] [libwebsockets] #31: Memory leak when connecting from client using WS spec revision 0

Trac trac at libwebsockets.org
Mon Sep 16 14:23:31 CEST 2013


#31: Memory leak when connecting from client using WS spec revision 0
------------------------------------+--------------------
  Reporter:  dtgriscom              |      Owner:  agreen
      Type:  defect                 |     Status:  new
  Priority:  major                  |  Milestone:
 Component:  libwebsockets library  |    Version:
Resolution:                         |   Keywords:  memory
------------------------------------+--------------------

Comment (by dtgriscom):

 My final comment:

   Note that the "goto bail"s and "goto bail_nuke_ah"s seem to be used
 almost interchangeably; someone should review them to make sure the right
 choices are being made.

 is important. The containing function is coded as if wsi->u.hdr.ah can
 sometimes be non-null but still not a free-able block, requiring a {{{goto
 bail;}}} rather than a {{{goto bail_nuke_ah;}}}. I don't know the
 intricacies of the code, but would it perhaps be appropriate to ensure
 that wsi->u.hdr.ah is always either a valid free-able block, or null? Then
 you could punt the {{{bail:}}}/{{{bail_nuke_ah:}}} split. (Sorry if this
 should be broken off into a separate ticket.)

--
Ticket URL: <http://libwebsockets.org/trac/ticket/31#comment:1>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list