tar: error if strdup fails (estrdup)

This commit is contained in:
Hiltjo Posthuma 2015-04-20 18:32:15 +02:00 committed by sin
parent 71eeb21feb
commit 9c03736696

2
tar.c
View File

@ -210,7 +210,7 @@ unarchive(char *fname, ssize_t l, char b[BLKSIZ])
if (unlink(fname) < 0 && errno != ENOENT && errno != EISDIR)
eprintf("unlink %s:", fname);
tmp = strdup(fname);
tmp = estrdup(fname);
mkdirp(dirname(tmp));
free(tmp);