diff options
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/unstrip.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1c67b57f..f3875097 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2017-05-04 Ulf Hermann <[email protected]> + * unstrip.c: Use strndup and free instead of strndupa. + +2017-05-04 Ulf Hermann <[email protected]> + * stack.c: Cast pid_t to int when printing using %d. 2017-05-04 Ulf Hermann <[email protected]> diff --git a/src/unstrip.c b/src/unstrip.c index 8d5414fa..6b4598c8 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -291,12 +291,13 @@ make_directories (const char *path) if (lastslash == path) return; - char *dir = strndupa (path, lastslash - path); + char *dir = strndup (path, lastslash - path); while (mkdir (dir, 0777) < 0 && errno != EEXIST) if (errno == ENOENT) make_directories (dir); else error (EXIT_FAILURE, errno, _("cannot create directory '%s'"), dir); + free (dir); } /* Keep track of new section data we are creating, so we can free it |
