summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/lib/gencache.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/lib/gencache.c b/source/lib/gencache.c
index 1448d5a6382..c58642553c0 100644
--- a/source/lib/gencache.c
+++ b/source/lib/gencache.c
@@ -56,11 +56,7 @@ BOOL gencache_init(void)
/* skip file open if it's already opened */
if (cache) return True;
- asprintf(&cache_fname, "%s/%s", lock_path("gencache.tdb"));
- if (cache_fname == NULL) {
- DEBUG(0, ("Filename allocation failed.\n"));
- return False;
- }
+ cache_fname = lock_path("gencache.tdb");
DEBUG(5, ("Opening cache file at %s\n", cache_fname));
@@ -75,7 +71,6 @@ BOOL gencache_init(void)
}
}
- SAFE_FREE(cache_fname);
if (!cache) {
DEBUG(5, ("Attempt to open gencache.tdb has failed.\n"));
return False;