axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Blough (Jira)" <j...@apache.org>
Subject [jira] [Resolved] (AXIS2C-1473) some leaks in thread_unix.c and thread_pool.c
Date Tue, 07 Apr 2020 16:36:00 GMT

     [ https://issues.apache.org/jira/browse/AXIS2C-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bill Blough resolved AXIS2C-1473.
---------------------------------
    Resolution: Fixed

> some leaks in thread_unix.c and thread_pool.c
> ---------------------------------------------
>
>                 Key: AXIS2C-1473
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1473
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.7.0
>         Environment: linux
>            Reporter: Robert Springer
>            Priority: Minor
>             Fix For: 1.7.0
>
>
> some leaks in thread_unix.c and thread_pool.c:
> Index: util/src/platforms/unix/thread_unix.c
> ===================================================================
> --- util/src/platforms/unix/thread_unix.c	(revision 924674)
> +++ util/src/platforms/unix/thread_unix.c	(working copy)
> @@ -112,6 +112,7 @@
>      new->td = (pthread_t *)AXIS2_MALLOC(allocator, sizeof(pthread_t));
>      if(!new->td)
>      {
> +        AXIS2_FREE(allocator, new);
>          return NULL;
>      }
>  
> @@ -132,6 +133,8 @@
>      {
>          return new;
>      }
> +    AXIS2_FREE(allocator, new->td);
> +    AXIS2_FREE(allocator, new);
>      return NULL;
>  }
>  
> Index: util/src/thread_pool.c
> ===================================================================
> --- util/src/thread_pool.c	(revision 924674)
> +++ util/src/thread_pool.c	(working copy)
> @@ -143,5 +143,10 @@
>      {
>          AXIS2_ERROR_FREE(thread_env->error);
>      }
> +    axutil_allocator_t *allocator = NULL;
> +    allocator = thread_env->allocator;
>      AXIS2_FREE(thread_env->allocator, thread_env);
> +    if (allocator) {
> +      AXIS2_FREE(allocator, allocator);
> +    }
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Mime
View raw message