Attachments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #132: fix.patch

File fix.patch, 1.4 KB (added by ettlmartin, 2 years ago)

proper fix

  • example/scp_write.c

    diff --git a/example/scp_write.c b/example/scp_write.c
    index f6af186..6990bdb 100644
    a b int main(int argc, char *argv[]) 
    197197#else 
    198198    close(sock); 
    199199#endif 
     200 
     201        fclose(local); 
     202         
    200203    fprintf(stderr, "all done\n"); 
    201204    return 0; 
    202205} 
  • example/sftp_RW_nonblock.c

    diff --git a/example/sftp_RW_nonblock.c b/example/sftp_RW_nonblock.c
    index 70aad82..51435c6 100644
    a b int main(int argc, char *argv[]) 
    283283#else 
    284284    close(sock); 
    285285#endif 
     286 
     287        fclose(tempstorage); 
     288 
    286289    printf("all done\n"); 
    287290    return 0; 
    288291} 
  • example/sftp_write.c

    diff --git a/example/sftp_write.c b/example/sftp_write.c
    index 4d583ab..fd783a6 100644
    a b int main(int argc, char *argv[]) 
    199199#else 
    200200    close(sock); 
    201201#endif 
     202    fclose(local); 
    202203printf("all done\n"); 
    203204    return 0; 
    204205} 
  • example/x11.c

    diff --git a/example/x11.c b/example/x11.c
    index 5265b82..0f0ff07 100644
    a b static void x11_callback(LIBSSH2_SESSION *session, LIBSSH2_CHANNEL *channel, 
    126126 
    127127            sock = socket(AF_UNIX,SOCK_STREAM, 0); 
    128128            if (sock <0) 
     129                        { 
     130                                free(temp_buff); 
    129131                return; 
     132                        } 
    130133            memset(&addr, 0, sizeof(addr)); 
    131134            addr.sun_family = AF_UNIX; 
    132135            snprintf(addr.sun_path, sizeof(addr.sun_path),