bench: Add missing allocations checks

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
Jakub Jelen
2023-06-27 14:53:41 +02:00
parent a7f85944c8
commit 19404bf509
2 changed files with 17 additions and 2 deletions

View File

@@ -180,6 +180,9 @@ int benchmarks_async_sftp_down (ssh_session session, struct argument_s *args,
if(!file)
goto error;
ids = malloc(concurrent_downloads * sizeof(int));
if (ids == NULL) {
return -1;
}
if(args->verbose>0)
fprintf(stdout,"Starting download of %lu bytes now, using %d concurrent downloads\n",bytes,
concurrent_downloads);