[Libwebsockets] [libwebsockets] #12: Memory leak when creating/destroying context more than once

Trac trac at libwebsockets.org
Tue Feb 12 01:33:04 CET 2013

#12: Memory leak when creating/destroying context more than once
  Reporter:  aleksandar.zivkovic    |      Owner:  agreen
      Type:  defect                 |     Status:  new
  Priority:  major                  |  Milestone:
 Component:  libwebsockets library  |    Version:
Resolution:                         |   Keywords:  memory leak

Comment (by aleksandar.zivkovic):

 Here are more details on how to reproduce an issue:
 Step 1: Download libwebsockets from http://git.warmcat.com/cgi-
 Step 2: Update ./test-server/test-server.c file so
 ibwebsocket_create_context/libwebsocket_context_destroy calls are
 performed twice (attached is the file). The modification will create
 context for 10 seconds, then destroy it, then run it for next 10 seconds,
 then destroy it.
 Step 3: configure and build without fork support
 Step 4: run application with valgrind: valgrind --leak-check=full
 During app runtime connect to it with two browser pages. After app ends
 valgrind reports memory leak from first comment.

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

More information about the Libwebsockets mailing list