URI: 
       tFix memory leak in downloaditem - sacc - sacc(omys), simple console gopher client (mirror)
  HTML git clone https://git.parazyd.org/sacc
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
   DIR commit 827820f5580b8880939337772d85e59ae87721b6
   DIR parent 2cc14415ea4515db3271d8af0cc8b36dc62b3f71
  HTML Author: Quentin Rameau <quinq@fifth.space>
       Date:   Fri, 11 Oct 2019 17:02:19 +0200
       
       Fix memory leak in downloaditem
       
       Thanks to solene for spotting this!
       
       Diffstat:
         M sacc.c                              |       7 +++++--
       
       1 file changed, 5 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/sacc.c b/sacc.c
       t@@ -574,8 +574,11 @@ downloaditem(Item *item)
                if (!download(item, dest))
                        goto cleanup;
        
       -        if (!item->tag)
       -                item->tag = path;
       +        if (item->tag)
       +                goto cleanup;
       +
       +        item->tag = path;
       +
                return;
        cleanup:
                free(path);