Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 338137 | Differences between
and this patch

Collapse All | Expand All

(-)a/util.c (-6 / +1 lines)
Lines 187-200 void *x_realloc(void *ptr, size_t size) Link Here
187
{
187
{
188
	void *p2;
188
	void *p2;
189
	if (!ptr) return x_malloc(size);
189
	if (!ptr) return x_malloc(size);
190
	p2 = malloc(size);
190
	p2 = realloc(ptr, size);
191
	if (!p2) {
191
	if (!p2) {
192
		fatal("out of memory in x_realloc");
192
		fatal("out of memory in x_realloc");
193
	}
193
	}
194
	if (ptr) {
195
		memcpy(p2, ptr, size);
196
		free(ptr);
197
	}
198
	return p2;
194
	return p2;
199
}
195
}
200
196
201
- 

Return to bug 338137