1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-28 01:41:48 +03:00

tests: Fixed some cppcheck warnings.

This commit is contained in:
Oliver Stöneberg
2011-05-09 09:27:39 -07:00
committed by Andreas Schneider
parent 7f0761885c
commit e3311d03db
2 changed files with 4 additions and 2 deletions

View File

@ -75,12 +75,12 @@ int benchmarks_ping_latency (const char *host, float *average){
} }
if(!found) if(!found)
goto parseerror; goto parseerror;
fclose(fd); pclose(fd);
return 0; return 0;
parseerror: parseerror:
fprintf(stderr,"Parse error : couldn't locate average in %s",line); fprintf(stderr,"Parse error : couldn't locate average in %s",line);
fclose(fd); pclose(fd);
return -1; return -1;
} }

View File

@ -132,6 +132,7 @@ int torture_rmdirs(const char *path) {
rewinddir(d); rewinddir(d);
} }
} else { } else {
closedir(d);
return -1; return -1;
} }
@ -257,6 +258,7 @@ failed:
} }
ssh_disconnect(t->ssh); ssh_disconnect(t->ssh);
ssh_free(t->ssh); ssh_free(t->ssh);
free(t);
return NULL; return NULL;
} }