From: Richard Russon Date: Tue, 13 Dec 2016 20:35:04 +0000 (+0000) Subject: build: fix check_sec.sh warnings X-Git-Tag: neomutt-20170113~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b531db03a843074887a899a641b084a5fed7fa1;p=neomutt build: fix check_sec.sh warnings check_sec.sh checks for calls to malloc(), free(), etc. --- diff --git a/hcache-bdb.c b/hcache-bdb.c index 3c291386c..3c2b41454 100644 --- a/hcache-bdb.c +++ b/hcache-bdb.c @@ -143,7 +143,7 @@ hcache_bdb_fetch(void *vctx, const char *key, size_t keylen) static void hcache_bdb_free(void *vctx, void **data) { - FREE(data); + FREE(data); /* __FREE_CHECKED__ */ } static int diff --git a/hcache-gdbm.c b/hcache-gdbm.c index 6aa055c2b..da27018bf 100644 --- a/hcache-gdbm.c +++ b/hcache-gdbm.c @@ -63,7 +63,7 @@ hcache_gdbm_fetch(void *ctx, const char *key, size_t keylen) static void hcache_gdbm_free(void *vctx, void **data) { - FREE(data); + FREE(data); /* __FREE_CHECKED__ */ } static int diff --git a/hcache-kc.c b/hcache-kc.c index ff0763186..46a0968d0 100644 --- a/hcache-kc.c +++ b/hcache-kc.c @@ -73,7 +73,7 @@ hcache_kyotocabinet_fetch(void *ctx, const char *key, size_t keylen) static void hcache_kyotocabinet_free(void *vctx, void **data) { - FREE(data); + FREE(data); /* __FREE_CHECKED__ */ } static int diff --git a/hcache-qdbm.c b/hcache-qdbm.c index 3de9cf4ab..798d46156 100644 --- a/hcache-qdbm.c +++ b/hcache-qdbm.c @@ -53,7 +53,7 @@ hcache_qdbm_fetch(void *ctx, const char *key, size_t keylen) static void hcache_qdbm_free(void *ctx, void **data) { - FREE(data); + FREE(data); /* __FREE_CHECKED__ */ } static int diff --git a/hcache-tc.c b/hcache-tc.c index 85b5ba8fc..2824a916b 100644 --- a/hcache-tc.c +++ b/hcache-tc.c @@ -63,7 +63,7 @@ hcache_tokyocabinet_fetch(void *ctx, const char *key, size_t keylen) static void hcache_tokyocabinet_free(void *ctx, void **data) { - FREE(data); + FREE(data); /* __FREE_CHECKED__ */ } static int diff --git a/hcache.c b/hcache.c index 7627420ce..85dde3a68 100644 --- a/hcache.c +++ b/hcache.c @@ -865,7 +865,7 @@ mutt_hcache_free(header_cache_t *h, void **data) if (!h || !ops) return; - ops->free(h->ctx, data); + ops->free(h->ctx, data); /* __MEM_CHECKED__ */ } int @@ -932,7 +932,7 @@ mutt_hcache_backend_list() len += snprintf(tmp+len, STRING-len, "%s", (*ops)->name); } - return strdup(tmp); + return safe_strdup(tmp); } int diff --git a/hdrline.c b/hdrline.c index 04159f2f5..1997da2a4 100644 --- a/hdrline.c +++ b/hdrline.c @@ -189,7 +189,7 @@ enum FieldType /** * 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 diff --git a/init.c b/init.c index 27fff8798..7058f5fbf 100644 --- a/init.c +++ b/init.c @@ -2365,7 +2365,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) 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 diff --git a/strndup.c b/strndup.c index f130730aa..7e395389e 100644 --- a/strndup.c +++ b/strndup.c @@ -11,7 +11,7 @@ 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';