Commit 39595cfe authored by Simon Kelley's avatar Simon Kelley

Fix memory leak.

parent ffa3d7d6
...@@ -1369,14 +1369,14 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma ...@@ -1369,14 +1369,14 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
strcat(path, "/"); strcat(path, "/");
strcat(path, ent->d_name); strcat(path, ent->d_name);
/* files must be readable */
if (stat(path, &buf) == -1) if (stat(path, &buf) == -1)
die(_("cannot access %s: %s"), path, EC_FILE); die(_("cannot access %s: %s"), path, EC_FILE);
/* only reg files allowed. */ /* only reg files allowed. */
if (!S_ISREG(buf.st_mode)) if (S_ISREG(buf.st_mode))
continue; one_file(path, 0);
/* files must be readable */
one_file(path, 0);
free(path); free(path);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment