summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2001-02-15 19:50:11 +0000
committerEric Andersen2001-02-15 19:50:11 +0000
commitb50d707633df4857aa3ade51611edaef2792a61b (patch)
tree103ce2d4fe49d878cfc40d4b09b7329b8046cac7
parent02b9f42a278c8ee4c9c215eb4addf2a985cc9668 (diff)
downloadbusybox-b50d707633df4857aa3ade51611edaef2792a61b.zip
busybox-b50d707633df4857aa3ade51611edaef2792a61b.tar.gz
fix a few mallocs to be xmallocs.
-Erik
-rw-r--r--archival/dpkg.c4
-rw-r--r--dpkg.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 6e309eb..0e4fd8e 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -192,7 +192,7 @@ static void depends_sort_visit(package_t **ordered, package_t *pkgs,
#if 0
/* add it to the list */
- newnode = (struct package_t *)malloc(sizeof(struct package_t));
+ newnode = (struct package_t *)xmalloc(sizeof(struct package_t));
/* make a shallow copy */
*newnode = *pkg;
newnode->next = *ordered;
@@ -609,7 +609,7 @@ static int dpkg_dounpack(package_t *pkg)
}
/* create the list file */
- lst_file = (char *) malloc(strlen(infodir) + strlen(pkg->package) + 6);
+ lst_file = (char *) xmalloc(strlen(infodir) + strlen(pkg->package) + 6);
strcpy(lst_file, infodir);
strcat(lst_file, pkg->package);
strcat(lst_file, ".list");
diff --git a/dpkg.c b/dpkg.c
index 6e309eb..0e4fd8e 100644
--- a/dpkg.c
+++ b/dpkg.c
@@ -192,7 +192,7 @@ static void depends_sort_visit(package_t **ordered, package_t *pkgs,
#if 0
/* add it to the list */
- newnode = (struct package_t *)malloc(sizeof(struct package_t));
+ newnode = (struct package_t *)xmalloc(sizeof(struct package_t));
/* make a shallow copy */
*newnode = *pkg;
newnode->next = *ordered;
@@ -609,7 +609,7 @@ static int dpkg_dounpack(package_t *pkg)
}
/* create the list file */
- lst_file = (char *) malloc(strlen(infodir) + strlen(pkg->package) + 6);
+ lst_file = (char *) xmalloc(strlen(infodir) + strlen(pkg->package) + 6);
strcpy(lst_file, infodir);
strcat(lst_file, pkg->package);
strcat(lst_file, ".list");