diff options
Diffstat (limited to 'sfdisk.c')
-rw-r--r-- | sfdisk.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -300,8 +300,7 @@ static struct sector *get_sector(char *dev, int fd, unsigned long sno) | |||
300 | if (!sseek(dev, fd, sno)) | 300 | if (!sseek(dev, fd, sno)) |
301 | return 0; | 301 | return 0; |
302 | 302 | ||
303 | if (!(s = (struct sector *) malloc(sizeof(struct sector)))) | 303 | s = (struct sector *) xmalloc(sizeof(struct sector)); |
304 | fatalError("out of memory - giving up\n"); | ||
305 | 304 | ||
306 | if (read(fd, s->data, sizeof(s->data)) != sizeof(s->data)) { | 305 | if (read(fd, s->data, sizeof(s->data)) != sizeof(s->data)) { |
307 | perror("read"); | 306 | perror("read"); |