Changeset 1370
- Timestamp:
- 07/13/11 00:35:21 (10 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
flashrom.c (modified) (2 diffs)
-
hwaccess.c (modified) (1 diff)
-
pcidev.c (modified) (1 diff)
-
serial.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/flashrom.c
r1364 r1370 1514 1514 1515 1515 msg_cinfo("Erasing and writing flash chip... "); 1516 curcontents = (uint8_t *) malloc(size); 1516 curcontents = malloc(size); 1517 if (!curcontents) { 1518 msg_gerr("Out of memory!\n"); 1519 exit(1); 1520 } 1517 1521 /* Copy oldcontents to curcontents to avoid clobbering oldcontents. */ 1518 1522 memcpy(curcontents, oldcontents, size); … … 1881 1885 } 1882 1886 1883 oldcontents = (uint8_t *) malloc(size); 1887 oldcontents = malloc(size); 1888 if (!oldcontents) { 1889 msg_gerr("Out of memory!\n"); 1890 exit(1); 1891 } 1884 1892 /* Assume worst case: All bits are 0. */ 1885 1893 memset(oldcontents, 0x00, size); 1886 newcontents = (uint8_t *) malloc(size); 1894 newcontents = malloc(size); 1895 if (!newcontents) { 1896 msg_gerr("Out of memory!\n"); 1897 exit(1); 1898 } 1887 1899 /* Assume best case: All bits should be 1. */ 1888 1900 memset(newcontents, 0xff, size); -
trunk/hwaccess.c
r1338 r1370 227 227 struct undo_mmio_write_data *undo_mmio_write_data; \ 228 228 undo_mmio_write_data = malloc(sizeof(struct undo_mmio_write_data)); \ 229 if (!undo_mmio_write_data) { \ 230 msg_gerr("Out of memory!\n"); \ 231 exit(1); \ 232 } \ 229 233 undo_mmio_write_data->addr = a; \ 230 234 undo_mmio_write_data->type = mmio_write_type_##c; \ -
trunk/pcidev.c
r1338 r1370 296 296 struct undo_pci_write_data *undo_pci_write_data; \ 297 297 undo_pci_write_data = malloc(sizeof(struct undo_pci_write_data)); \ 298 if (!undo_pci_write_data) { \ 299 msg_gerr("Out of memory!\n"); \ 300 exit(1); \ 301 } \ 298 302 undo_pci_write_data->dev = *a; \ 299 303 undo_pci_write_data->reg = b; \ -
trunk/serial.c
r1363 r1370 111 111 (tolower((unsigned char)dev[2]) == 'm')) { 112 112 dev2 = malloc(strlen(dev) + 5); 113 if (!dev2) 114 sp_die("Error: Out of memory"); 113 115 strcpy(dev2, "\\\\.\\"); 114 116 strcpy(dev2 + 4, dev);
Note: See TracChangeset
for help on using the changeset viewer.
