Hi Jukka,

On Wed, Aug 31, 2011 at 11:42:44AM +0300, Jukka Rissanen wrote:
> closedir() releases the filename but we were accessing it later.
> ---
>  src/timezone.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/timezone.c b/src/timezone.c
> index 08f904f..1234622 100644
> --- a/src/timezone.c
> +++ b/src/timezone.c
> @@ -185,9 +185,10 @@ static char *find_origin(void *src_map, struct stat 
> *src_st,
>                                                       subpath, d->d_name);
>  
>                       if (compare_file(src_map, src_st, pathname) == 0) {
> -                             closedir(dir);
> -                             return g_strdup_printf("%s/%s",
> +                             str = g_strdup_printf("%s/%s",
>                                                       subpath, d->d_name);
> +                             closedir(dir);
> +                             return str;
Ok, patch applied now.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to