X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fgnu.c;h=ef51f2b5fedd138f67bc13a703a7f7a7124c7008;hb=8ca4064a8ce9de6ed8ad4e70f925e671f5172c0e;hp=a360212b7171d9c8e06956b80952877451e18089;hpb=3bf00060f38666b91c7c286ea6cc62f5d72bdd5b;p=chaz%2Ftar diff --git a/src/gnu.c b/src/gnu.c index a360212..ef51f2b 100644 --- a/src/gnu.c +++ b/src/gnu.c @@ -1,5 +1,5 @@ /* GNU dump extensions to tar. - Copyright (C) 1988, 1992 Free Software Foundation + Copyright (C) 1988, 1992, 1993 Free Software Foundation This file is part of GNU Tar. @@ -77,14 +77,14 @@ add_dir (name, dev, ino, text) { struct dirname *dp; - dp = (struct dirname *) malloc (sizeof (struct dirname)); + dp = (struct dirname *) ck_malloc (sizeof (struct dirname)); if (!dp) abort (); dp->next = dir_list; dir_list = dp; dp->dev = dev; dp->ino = ino; - dp->name = malloc (strlen (name) + 1); + dp->name = ck_malloc (strlen (name) + 1); strcpy (dp->name, name); dp->dir_text = text; dp->allnew = 0; @@ -434,12 +434,12 @@ get_dir_contents (p, device) n_strs++; p_buf += tmp; } - vec = (char **) malloc (sizeof (char *) * (n_strs + 1)); + vec = (char **) ck_malloc (sizeof (char *) * (n_strs + 1)); for (p_vec = vec, p_buf = buf; *p_buf; p_buf += strlen (p_buf) + 1) *p_vec++ = p_buf; *p_vec = 0; qsort ((PTR) vec, n_strs, sizeof (char *), dirent_cmp); - new_buf = (char *) malloc (p_buf - buf + 2); + new_buf = (char *) ck_malloc (p_buf - buf + 2); for (p_vec = vec, p_buf = new_buf; *p_vec; p_vec++) { char *p_tmp; @@ -578,7 +578,7 @@ gnu_restore (skipcrud) add_buffer (the_buffer, "", 1); current_dir = get_buffer (the_buffer); - archive_dir = (char *) malloc (hstat.st_size); + archive_dir = (char *) ck_malloc (hstat.st_size); if (archive_dir == 0) { msg ("Can't allocate %d bytes for restore", hstat.st_size);