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

Freeing of guththila stacks appears to free the last entry twice

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: guththila
    • Labels:
      None
    • Environment:
      windows

      Description

      Freeing of stacks is trying to free the last element twice - this fixes that.

      GUTHTHILA_DECLARE (void)
      guththila_stack_free_rec (guththila_environment_t * environment,
      guththila_stack_t * stack,
      guththila_element_t * elem)
      {
      if (elem->prev == NULL)

      { GUTHTHILA_FREE (environment->allocator, elem); }

      else

      { /*- elem = elem->prev;*/ /*- guththila_stack_free_rec (environment, stack, elem); */ /*+*/guththila_stack_free_rec (environment, stack, elem->prev); GUTHTHILA_FREE (environment->allocator, elem); }

      }

      GUTHTHILA_DECLARE (void)
      guththila_stack_free (guththila_environment_t * environment,
      guththila_stack_t * stack)
      {
      if (stack && (stack->pointer > 0))

      { guththila_element_t *ele = stack->tail; guththila_stack_free_rec (environment, stack, ele); /*- GUTHTHILA_FREE (environment->allocator, ele);*/ GUTHTHILA_FREE (environment->allocator, stack); }

      }

        Attachments

          Activity

            People

            • Assignee:
              xydinesh Dinesh Weerapurage
              Reporter:
              edslattery Edward Slattery
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: