aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-15 19:50:11 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-15 19:50:11 +0000
commitb43880076224b61e99ebf689f773862cf113452c (patch)
tree103ce2d4fe49d878cfc40d4b09b7329b8046cac7
parent08fa2c4e10acbcaa03cf1515bbc8eb6e6418a937 (diff)
downloadbusybox-w32-b43880076224b61e99ebf689f773862cf113452c.tar.gz
busybox-w32-b43880076224b61e99ebf689f773862cf113452c.tar.bz2
busybox-w32-b43880076224b61e99ebf689f773862cf113452c.zip
fix a few mallocs to be xmallocs.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@1826 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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 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");
diff --git a/dpkg.c b/dpkg.c
index 6e309eb06..0e4fd8efc 100644
--- a/dpkg.c
+++ b/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");