On Tue, Jul 07, 2015 at 07:35:26PM +0200, Salvador Cuñat wrote:
> This makes subsurface crash by simply clicking a dive in the list.

I didn't get that crash (which is surprising, looking at the code), but
you are right, good catch. The pointer is freed in the free_taxonomy()
call already.

/D

> Signed-off-by: Salvador Cuñat <[email protected]>
> ---
>  divesite.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/divesite.c b/divesite.c
> index 5abab76..5c96bb2 100644
> --- a/divesite.c
> +++ b/divesite.c
> @@ -171,7 +171,6 @@ void copy_dive_site(struct dive_site *orig, struct 
> dive_site *copy)
>       copy->uuid = orig->uuid;
>       if (orig->taxonomy.category == NULL) {
>               free_taxonomy(copy->taxonomy.category);
> -             free(copy->taxonomy.category);
>               copy->taxonomy.category = NULL;
>               copy->taxonomy.nr = 0;
>       } else {
> -- 
> 2.1.4
> 
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to