use calloc instead of malloc when initializing footnotes & flags

This commit is contained in:
jessica parsons
2025-09-08 09:31:16 -07:00
parent 41f71fe10f
commit 985091d673
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ mkd_init_flags(mkd_flag_t *p)
mkd_flag_t *
mkd_flags(void)
{
mkd_flag_t *p = malloc( sizeof(mkd_flag_t) );
mkd_flag_t *p = calloc( 1, sizeof(mkd_flag_t) );
if ( p )
mkd_init_flags(p);
+1 -1
View File
@@ -106,7 +106,7 @@ ___mkd_initmmiot(MMIOT *f, void *footnotes, mkd_flag_t *flags)
if ( footnotes )
f->footnotes = footnotes;
else {
f->footnotes = malloc(sizeof f->footnotes[0]);
f->footnotes = calloc(1, sizeof f->footnotes[0]);
CREATE(f->footnotes->note);
}
if ( flags )