make sure malloc doesn't fail in vol package either
/* if no last elt (first call) or last item full, get a new one */
if ((!ah->last) || ah->last->nitems >= CLONE_MAXITEMS) {
ti = (struct clone_items *) malloc(sizeof(struct clone_items));
+ if (!ti) {
+ Log("ci_AddItem: malloc failed\n");
+ assert(0);
+ }
ti->nitems = 0;
ti->next = (struct clone_items *) 0;
if (ah->last) {
} else {
/* growing file - grow in a reasonable increment */
char *buf = (char *)malloc(16*1024);
+ if (!buf) Abort("VAllocVnode: malloc failed\n");
memset(buf, 0, 16*1024);
FDH_WRITE(fdP, buf, 16*1024);
free(buf);
UpdateList = (VolumeId *) realloc(UpdateList, sizeof (VolumeId) * updateSize);
}
}
+ assert(UpdateList != NULL);
UpdateList[nUpdatedVolumes++] = V_id(vp);
}