summaryrefslogtreecommitdiff
path: root/src/help.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-10-13 08:20:35 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2016-10-13 19:51:43 +0200
commit9ef5fe2191c5d1d857bc4fe828c15268ba8caa90 (patch)
treea02c31a337f0b189ea0cab7141901ee455ccc3d9 /src/help.c
parentda6334cf385ff064a8296e8c0d0e080fa2014eaa (diff)
downloadcalcurse-9ef5fe2191c5d1d857bc4fe828c15268ba8caa90.zip
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>
Diffstat (limited to 'src/help.c')
-rw-r--r--src/help.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/help.c b/src/help.c
index 2de01cd..5cfe6d0 100644
--- a/src/help.c
+++ b/src/help.c
@@ -45,7 +45,7 @@ static int find_basedir(const char *locale_info[], unsigned n, char **basedir)
for (i = 0; i < n; i++) {
if (!locale_info[i])
continue;
- locale = strdup(locale_info[i]);
+ locale = mem_strdup(locale_info[i]);
asprintf(basedir, "%s/%s", DOCDIR, locale);
if (io_dir_exists(*basedir)) {
@@ -79,7 +79,7 @@ static int find_basedir(const char *locale_info[], unsigned n, char **basedir)
cleanup:
if (locale)
- free(locale);
+ mem_free(locale);
return ret;
}