Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1324

Memory leak in axis2_core_utils_free_rest_map()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.6.0
    • None
    • None
    • Linux

    Description

      In axis2_core_utils_free_rest_map() defined in src/core/util/core_utils.c mapping_struct is not freed. Valgrind output follows,

      ==5573==
      ==5573== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 37 from 1)
      ==5573== malloc/free: in use at exit: 248 bytes in 4 blocks.
      ==5573== malloc/free: 11,040 allocs, 11,036 frees, 497,370 bytes allocated.
      ==5573== For counts of detected errors, rerun with: -v
      ==5573== searching for pointers to 4 not-freed blocks.
      ==5573== checked 135,768 bytes.
      ==5573==
      ==5573== 12 bytes in 1 blocks are definitely lost in loss record 1 of 3
      ==5573== at 0x4006AEE: malloc (vg_replace_malloc.c:207)
      ==5573== by 0x405EF62: axutil_allocator_malloc_impl (allocator.c:75)
      ==5573== by 0x40E7324: axis2_core_utils_prepare_rest_mapping (core_utils.c:546)
      ==5573== by 0x805C7B2: axis2_svc_add_rest_mapping (svc.c:1318)
      ==5573== by 0x806C2A1: axis2_svc_builder_populate_svc (svc_builder.c:454)
      ==5573== by 0x80756FA: axis2_arch_reader_build_svc_grp (arch_reader.c:223)
      ==5573== by 0x80752A3: axis2_arch_reader_process_svc_grp (arch_reader.c:127)
      ==5573== by 0x8068AF0: axis2_dep_engine_do_deploy (dep_engine.c:1509)
      ==5573== by 0x8076791: axis2_ws_info_list_update (ws_info_list.c:398)
      ==5573== by 0x807356C: axis2_repos_listener_update (repos_listener.c:281)
      ==5573== by 0x807363D: axis2_repos_listener_init (repos_listener.c:307)
      ==5573== by 0x807304E: axis2_repos_listener_create_with_folder_name_and_dep_engine (repos_listener.c:130)
      ==5573==
      ==5573== LEAK SUMMARY:
      ==5573== definitely lost: 12 bytes in 1 blocks.
      ==5573== possibly lost: 0 bytes in 0 blocks.
      ==5573== still reachable: 236 bytes in 3 blocks.
      ==5573== suppressed: 0 bytes in 0 blocks.

      Attachments

        1. core_utils.c.patch
          0.4 kB
          Chintana Wilamuna

        Activity

          People

            manjula peiris Manjula Peiris
            chintana Chintana Wilamuna
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: