diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-02-15 19:50:11 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-02-15 19:50:11 +0000 |
commit | b50d707633df4857aa3ade51611edaef2792a61b (patch) | |
tree | 103ce2d4fe49d878cfc40d4b09b7329b8046cac7 | |
parent | 02b9f42a278c8ee4c9c215eb4addf2a985cc9668 (diff) | |
download | busybox-w32-b50d707633df4857aa3ade51611edaef2792a61b.tar.gz busybox-w32-b50d707633df4857aa3ade51611edaef2792a61b.tar.bz2 busybox-w32-b50d707633df4857aa3ade51611edaef2792a61b.zip |
fix a few mallocs to be xmallocs.
-Erik
-rw-r--r-- | archival/dpkg.c | 4 | ||||
-rw-r--r-- | dpkg.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index 6e309eb06..0e4fd8efc 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -192,7 +192,7 @@ static void depends_sort_visit(package_t **ordered, package_t *pkgs, | |||
192 | 192 | ||
193 | #if 0 | 193 | #if 0 |
194 | /* add it to the list */ | 194 | /* add it to the list */ |
195 | newnode = (struct package_t *)malloc(sizeof(struct package_t)); | 195 | newnode = (struct package_t *)xmalloc(sizeof(struct package_t)); |
196 | /* make a shallow copy */ | 196 | /* make a shallow copy */ |
197 | *newnode = *pkg; | 197 | *newnode = *pkg; |
198 | newnode->next = *ordered; | 198 | newnode->next = *ordered; |
@@ -609,7 +609,7 @@ static int dpkg_dounpack(package_t *pkg) | |||
609 | } | 609 | } |
610 | 610 | ||
611 | /* create the list file */ | 611 | /* create the list file */ |
612 | lst_file = (char *) malloc(strlen(infodir) + strlen(pkg->package) + 6); | 612 | lst_file = (char *) xmalloc(strlen(infodir) + strlen(pkg->package) + 6); |
613 | strcpy(lst_file, infodir); | 613 | strcpy(lst_file, infodir); |
614 | strcat(lst_file, pkg->package); | 614 | strcat(lst_file, pkg->package); |
615 | strcat(lst_file, ".list"); | 615 | strcat(lst_file, ".list"); |
@@ -192,7 +192,7 @@ static void depends_sort_visit(package_t **ordered, package_t *pkgs, | |||
192 | 192 | ||
193 | #if 0 | 193 | #if 0 |
194 | /* add it to the list */ | 194 | /* add it to the list */ |
195 | newnode = (struct package_t *)malloc(sizeof(struct package_t)); | 195 | newnode = (struct package_t *)xmalloc(sizeof(struct package_t)); |
196 | /* make a shallow copy */ | 196 | /* make a shallow copy */ |
197 | *newnode = *pkg; | 197 | *newnode = *pkg; |
198 | newnode->next = *ordered; | 198 | newnode->next = *ordered; |
@@ -609,7 +609,7 @@ static int dpkg_dounpack(package_t *pkg) | |||
609 | } | 609 | } |
610 | 610 | ||
611 | /* create the list file */ | 611 | /* create the list file */ |
612 | lst_file = (char *) malloc(strlen(infodir) + strlen(pkg->package) + 6); | 612 | lst_file = (char *) xmalloc(strlen(infodir) + strlen(pkg->package) + 6); |
613 | strcpy(lst_file, infodir); | 613 | strcpy(lst_file, infodir); |
614 | strcat(lst_file, pkg->package); | 614 | strcat(lst_file, pkg->package); |
615 | strcat(lst_file, ".list"); | 615 | strcat(lst_file, ".list"); |