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

Collapse All | Expand All

(-)sandbox-2.2_old/libsandbox/canonicalize.c (-2 / +6 lines)
Lines 74-80 Link Here
74
		path_max = 1024;
74
		path_max = 1024;
75
#endif
75
#endif
76
76
77
	if (resolved == NULL) {
77
	if (resolved == NULL || name == resolved) {
78
		rpath = xmalloc(path_max);
78
		rpath = xmalloc(path_max);
79
	} else
79
	} else
80
		rpath = resolved;
80
		rpath = resolved;
Lines 207-213 Link Here
207
	return rpath;
207
	return rpath;
208
208
209
error:
209
error:
210
	if (resolved)
210
	if ( name == resolved ){
211
		snprintf(resolved, path_max, "%s", rpath);
212
		free(rpath);
213
	}
214
	else if (resolved)
211
		snprintf(resolved, path_max, "%s", rpath);
215
		snprintf(resolved, path_max, "%s", rpath);
212
	else
216
	else
213
		free(rpath);
217
		free(rpath);

Return to bug 292050