aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sftp.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/sftp.c b/src/sftp.c
index 1fd2f4bc..3726993c 100644
--- a/src/sftp.c
+++ b/src/sftp.c
@@ -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)