From b47984262ac098c6d3d258297602a982a34a95be Mon Sep 17 00:00:00 2001 From: Henry Amrhein Date: Fri, 21 Dec 2012 22:46:05 -0800 Subject: [PATCH] removed duplicate code from download_from_remote() --- bam_index.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bam_index.c b/bam_index.c index 3574cbc..bc89b5b 100644 --- a/bam_index.c +++ b/bam_index.c @@ -521,10 +521,7 @@ static void download_from_remote(const char *url) while ((l = knet_read(fp_remote, buf, buf_size)) != 0) if (fwrite(buf, 1, l, fp) < l) { fprintf(stderr, "[download_from_remote] fail to write to destination file.\n"); - free(buf); - knet_close(fp_remote); - fclose(fp); - return; + break; } free(buf); fclose(fp); -- 2.30.2