#include <stdio.h>
#include <ctype.h>
+#include <assert.h>
#include "bam.h"
#include "bam_endian.h"
#include "kstring.h"
}
free(header->text);
#ifndef BAM_NO_HASH
+ if (header->rg2lib) bam_strmap_destroy(header->rg2lib);
bam_destroy_header_hash(header);
#endif
free(header);
{
char *s = bam_format1(header, b);
printf("%s\n", s);
+ free(s);
}