char **remove_files;
/* Create a list of all /var/lib/dpkg/info/<package> files */
- remove_files = malloc(sizeof(all_control_files));
+ remove_files = xmalloc(sizeof(all_control_files));
while (all_control_files[i]) {
remove_files[i] = xmalloc(strlen(package_name) + strlen(all_control_files[i]) + 21);
sprintf(remove_files[i], "/var/lib/dpkg/info/%s.%s", package_name, all_control_files[i]);
/* initial shift register value */
gunzip_crc = 0xffffffffL;
- gunzip_crc_table = (unsigned int *) malloc(256 * sizeof(unsigned int));
+ gunzip_crc_table = (unsigned int *) xmalloc(256 * sizeof(unsigned int));
/* Compute and print table of CRC's, five per line */
for (i = 0; i < 256; i++) {
storepos = lseek(fd,0,SEEK_CUR) + header.entries * 16;
while (header.entries--) {
- tmpindex = tags[tagindex++] = malloc(sizeof(rpm_index));
+ tmpindex = tags[tagindex++] = xmalloc(sizeof(rpm_index));
read(fd, tmpindex, sizeof(rpm_index));
tmpindex->tag = ntohl(tmpindex->tag); tmpindex->type = ntohl(tmpindex->type); tmpindex->count = ntohl(tmpindex->count);
tmpindex->offset = storepos + ntohl(tmpindex->offset);