aboutsummaryrefslogtreecommitdiff
path: root/archival/rpm.c
diff options
context:
space:
mode:
authorvapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-08-16 05:32:42 +0000
committervapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-08-16 05:32:42 +0000
commita97a244cee07da5b102b411ee9f2f97a084e81c2 (patch)
tree47b604f693a34a36895b4cfd4cfb47ccf6e3c029 /archival/rpm.c
parent93a87633210777b20d186aa7f5f59158b78b9b08 (diff)
downloadbusybox-w32-a97a244cee07da5b102b411ee9f2f97a084e81c2.tar.gz
busybox-w32-a97a244cee07da5b102b411ee9f2f97a084e81c2.tar.bz2
busybox-w32-a97a244cee07da5b102b411ee9f2f97a084e81c2.zip
Bernhard Fischer says: use xmalloc() instead of malloc()
git-svn-id: svn://busybox.net/trunk/busybox@11168 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-rw-r--r--archival/rpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/rpm.c b/archival/rpm.c
index 41c6129ad..fa8db539a 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -243,7 +243,7 @@ rpm_index **rpm_gettags(int fd, int *num_tags)
243 storepos = lseek(fd,0,SEEK_CUR) + header.entries * 16; 243 storepos = lseek(fd,0,SEEK_CUR) + header.entries * 16;
244 244
245 while (header.entries--) { 245 while (header.entries--) {
246 tmpindex = tags[tagindex++] = malloc(sizeof(rpm_index)); 246 tmpindex = tags[tagindex++] = xmalloc(sizeof(rpm_index));
247 read(fd, tmpindex, sizeof(rpm_index)); 247 read(fd, tmpindex, sizeof(rpm_index));
248 tmpindex->tag = ntohl(tmpindex->tag); tmpindex->type = ntohl(tmpindex->type); tmpindex->count = ntohl(tmpindex->count); 248 tmpindex->tag = ntohl(tmpindex->tag); tmpindex->type = ntohl(tmpindex->type); tmpindex->count = ntohl(tmpindex->count);
249 tmpindex->offset = storepos + ntohl(tmpindex->offset); 249 tmpindex->offset = storepos + ntohl(tmpindex->offset);