tFree temporary path in downloaditem - sacc - sacc (saccomys): simple gopher client.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 97eaeb752ee3fd28ac14199692a5082e257ef10e
 (DIR) parent 4b108fa359dcfaa9750edd8733750edd3c088c82
 (HTM) Author: Quentin Rameau <quinq@fifth.space>
       Date:   Tue, 11 Jul 2017 00:55:37 +0200
       
       Free temporary path in downloaditem
       
       Diffstat:
         sacc.c                              |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/sacc.c b/sacc.c
       t@@ -342,7 +342,9 @@ downloaditem(Item *item)
        
                path[strlen(path)-1] = '\0';
        
       -        if ((dest = open(path, O_WRONLY|O_CREAT|O_EXCL, mode)) < 0) {
       +        dest = open(path, O_WRONLY|O_CREAT|O_EXCL, mode);
       +        free(path);
       +        if (dest < 0) {
                        printf("Can't open destination file %s: %s\n",
                               path, strerror(errno));
                        errno = 0;