swallowcc / rfc5766-turn-server

Automatically exported from code.google.com/p/rfc5766-turn-server
0 stars 0 forks source link

Modification of the point that is not been able to fully initialized. #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The problem is unlikely to be, but I have corrected the warning of valgrind.

*** a/src/apps/relay/ns_ioalib_engine_impl.c
--- b/src/apps/relay/ns_ioalib_engine_impl.c
***************
*** 171,180 **** static stun_buffer_list_elem *new_blist_elem(ioa_engine_handle 
e)

    if(!ret) {
      ret = (stun_buffer_list_elem *)turn_malloc(sizeof(stun_buffer_list_elem));
!     ret->buf.len = 0;
!     ret->buf.offset = 0;
!     ret->buf.coffset = 0;
!     ret->next = NULL;
    }

    return ret;
--- 171,177 ----

    if(!ret) {
      ret = (stun_buffer_list_elem *)turn_malloc(sizeof(stun_buffer_list_elem));
!       ns_bzero(ret, sizeof(stun_buffer_list_elem));
    }

    return ret;
***************
*** 3299,3304 **** void* allocate_super_memory_region_func(super_memory_t *r, 
size_t size, const ch
--- 3296,3302 ----
                TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,"(%s:%s:%d): allocated super memory: region id = %u, chunk=%lu, total=%lu, allocated=%lu, want=%lu\n",file,func,line,(unsigned int)r->id, (unsigned long)r->sm_chunk, (unsigned long)r->sm_total_sz, (unsigned long)r->sm_allocated,(unsigned long)size);

            char* ptr = r->super_memory + r->sm_total_sz - r->sm_allocated - size;
+             ns_bzero(ptr, size);

            r->sm_allocated += size;

Original issue reported on code.google.com by mutsutos...@mixi.co.jp on 20 Feb 2014 at 10:29

Attachments:

GoogleCodeExporter commented 9 years ago
That is harmless, I believe - that may only be annoying when you are using 
valgrind. But I'll fix that.

Original comment by mom040...@gmail.com on 20 Feb 2014 at 5:47

GoogleCodeExporter commented 9 years ago

Original comment by mom040...@gmail.com on 22 Feb 2014 at 8:32