Always use memory management wrappers

Use mem_*() wrappers instead of directly accessing libc functions when
allocating/deallocating memory.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2016-10-13 08:20:35 +02:00
parent da6334cf38
commit 9ef5fe2191
7 changed files with 18 additions and 18 deletions

View File

@@ -317,7 +317,7 @@ static time_t parse_datetimearg(const char *str)
static int parse_daterange(const char *str, time_t *date_from, time_t *date_to)
{
int ret = 0;
char *s = xstrdup(str);
char *s = mem_strdup(str);
char *p = strchr(s, ',');
if (!p)
@@ -344,7 +344,7 @@ static int parse_daterange(const char *str, time_t *date_from, time_t *date_to)
ret = 1;
cleanup:
free(s);
mem_free(s);
return ret;
}