check_sec.sh checks for calls to malloc(), free(), etc.
static void
hcache_bdb_free(void *vctx, void **data)
{
- FREE(data);
+ FREE(data); /* __FREE_CHECKED__ */
}
static int
static void
hcache_gdbm_free(void *vctx, void **data)
{
- FREE(data);
+ FREE(data); /* __FREE_CHECKED__ */
}
static int
static void
hcache_kyotocabinet_free(void *vctx, void **data)
{
- FREE(data);
+ FREE(data); /* __FREE_CHECKED__ */
}
static int
static void
hcache_qdbm_free(void *ctx, void **data)
{
- FREE(data);
+ FREE(data); /* __FREE_CHECKED__ */
}
static int
static void
hcache_tokyocabinet_free(void *ctx, void **data)
{
- FREE(data);
+ FREE(data); /* __FREE_CHECKED__ */
}
static int
if (!h || !ops)
return;
- ops->free(h->ctx, data);
+ ops->free(h->ctx, data); /* __MEM_CHECKED__ */
}
int
len += snprintf(tmp+len, STRING-len, "%s", (*ops)->name);
}
- return strdup(tmp);
+ return safe_strdup(tmp);
}
int
/**
* make_from_prefix - Create a prefix for an author field
* @disp: Type of field
- * @return: Prefix string (do not free() it)
+ * @return: Prefix string (do not free it)
*
* If $from_chars is set, pick an appropriate character from it.
* If not, use the default prefix: "To", "Cc", etc
mutt_extract_token (tmp, s, 0);
if (mutt_hcache_is_valid_backend(tmp->data))
{
- FREE ((void *)MuttVars[idx].data);
+ FREE ((void *)MuttVars[idx].data); /* __FREE_CHECKED__ */
*(char **)(MuttVars[idx].data) = safe_strdup(tmp->data);
}
else
char *strndup(const char *s, size_t n)
{
size_t len = strnlen(s, n);
- char *new = malloc((len + 1) * sizeof(char));
+ char *new = malloc((len + 1) * sizeof(char)); /* __MEM_CHECKED__ */
if (!new)
return NULL;
new[len] = '\0';