diff options
Diffstat (limited to 'util/path.c')
-rw-r--r-- | util/path.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/util/path.c b/util/path.c index 4c5b0f6296..f0c69627c7 100644 --- a/util/path.c +++ b/util/path.c @@ -47,10 +47,7 @@ static struct pathelem *new_entry(const char *root, { struct pathelem *new = malloc(sizeof(*new)); new->name = strdup(name); - if (asprintf(&new->pathname, "%s/%s", root, name) == -1) { - printf("Cannot allocate memory\n"); - exit(1); - } + new->pathname = g_strdup_printf("%s/%s", root, name); new->num_entries = 0; return new; } |