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

Trac trac at libwebsockets.org
Tue Feb 12 01:25:37 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:
 Keywords:  memory leak            |
-----------------------------------+--------------------
 I'm using libwebsockets in application that can load/unload library
 multiple times during application lifetime. When pairs:
 ibwebsocket_create_context/libwebsocket_context_destroy are called
 multiple times memory leak occurs.
 Here is part from valgrind report:
 ''==24922== 28,280 (19,040 direct, 9,240 indirect) bytes in 4 blocks are
 definitely lost in loss record 3 of 3
 ==24922==    at 0x4024F20: malloc (vg_replace_malloc.c:236)
 ==24922==    by 0x402CB6F: libwebsocket_create_new_server_wsi
 (libwebsockets.c:747)
 ==24922==    by 0x402F8AE: libwebsocket_service_fd (libwebsockets.c:1561)
 ==24922==    by 0x402FA6A: libwebsocket_service (libwebsockets.c:2190)
 ==24922==    by 0x80495EE: main (test-server.c:662)''

-- 
Ticket URL: <http://libwebsockets.org/trac/ticket/12>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list