diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sftp.c | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -79,23 +79,24 @@ static sftp_ext sftp_ext_new(void) { return ext; } -static void sftp_ext_free(sftp_ext ext) { - unsigned int i; +static void sftp_ext_free(sftp_ext ext) +{ + unsigned int i; - if (ext == NULL) { - return; - } + if (ext == NULL) { + return; + } - if (ext->count) { - for (i = 0; i < ext->count; i++) { - SAFE_FREE(ext->name[i]); - SAFE_FREE(ext->data[i]); + if (ext->count) { + for (i = 0; i < ext->count; i++) { + SAFE_FREE(ext->name[i]); + SAFE_FREE(ext->data[i]); + } + SAFE_FREE(ext->name); + SAFE_FREE(ext->data); } - SAFE_FREE(ext->name); - SAFE_FREE(ext->data); - } - SAFE_FREE(ext); + SAFE_FREE(ext); } sftp_session sftp_new(ssh_session session) |