mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
torture: Fix a resource leak on error.
This commit is contained in:
@@ -110,6 +110,7 @@ int torture_rmdirs(const char *path) {
|
||||
len = strlen(path) + strlen(dp->d_name) + 2;
|
||||
fname = malloc(len);
|
||||
if (fname == NULL) {
|
||||
closedir(d);
|
||||
return -1;
|
||||
}
|
||||
snprintf(fname, len, "%s/%s", path, dp->d_name);
|
||||
|
||||
Reference in New Issue
Block a user