summaryrefslogtreecommitdiff
path: root/utils/filepath.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/filepath.c')
-rw-r--r--utils/filepath.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/utils/filepath.c b/utils/filepath.c
index 21a965949..f0aa19585 100644
--- a/utils/filepath.c
+++ b/utils/filepath.c
@@ -89,21 +89,13 @@ char *filepath_sfindfile(char *str, const char *format, ...)
/* exported interface documented in filepath.h */
char *filepath_findfile(const char *format, ...)
{
- char *str;
char *ret;
va_list ap;
- str = malloc(PATH_MAX);
- if (str == NULL)
- return NULL; /* unable to allocate memory */
-
va_start(ap, format);
- ret = filepath_vsfindfile(str, format, ap);
+ ret = filepath_vsfindfile(NULL, format, ap);
va_end(ap);
- if (ret == NULL)
- free(str);
-
return ret;
}