]> git.donarmstrong.com Git - samtools.git/blobdiff - bcftools/call1.c
added ST
[samtools.git] / bcftools / call1.c
index 0991fce6f9b18905e5ad6f72929f0477d1b8482a..809fe344bfd0a7abf822b82db3670c25ed47689c 100644 (file)
@@ -214,7 +214,7 @@ static char **read_samples(const char *fn, int *_n)
        while (ks_getuntil(ks, 0, &s, &dret) >= 0) {
                if (max == n) {
                        max = max? max<<1 : 4;
-                       sam = realloc(sam, sizeof(void*));
+                       sam = realloc(sam, sizeof(void*)*max);
                }
                sam[n++] = strdup(s.s);
        }