=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/diff3.c,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/rcs/diff3.c 2006/05/08 10:19:34 1.6 --- src/usr.bin/rcs/diff3.c 2006/05/08 16:56:40 1.7 *************** *** 1,4 **** ! /* $OpenBSD: diff3.c,v 1.6 2006/05/08 10:19:34 xsa Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. --- 1,4 ---- ! /* $OpenBSD: diff3.c,v 1.7 2006/05/08 16:56:40 xsa Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. *************** *** 72,78 **** #ifndef lint static const char rcsid[] = ! "$OpenBSD: diff3.c,v 1.6 2006/05/08 10:19:34 xsa Exp $"; #endif /* not lint */ #include "includes.h" --- 72,78 ---- #ifndef lint static const char rcsid[] = ! "$OpenBSD: diff3.c,v 1.7 2006/05/08 16:56:40 xsa Exp $"; #endif /* not lint */ #include "includes.h" *************** *** 163,168 **** --- 163,169 ---- BUF *b1, *b2, *b3, *d1, *d2, *diffb; b1 = b2 = b3 = d1 = d2 = diffb = NULL; + dp13 = dp23 = path1 = path2 = path3 = NULL; rcsnum_tostr(rev1, r1, sizeof(r1)); rcsnum_tostr(rev2, r2, sizeof(r2)); *************** *** 195,202 **** rcs_buf_free(b2); b2 = NULL; ! rcs_diffreg(path1, path3, d1); ! rcs_diffreg(path2, path3, d2); (void)xasprintf(&dp13, "%s/d13.XXXXXXXXXX", rcs_tmpdir); rcs_buf_write_stmp(d1, dp13, 0600); --- 196,207 ---- rcs_buf_free(b2); b2 = NULL; ! if ((rcs_diffreg(path1, path3, d1) == D_ERROR) || ! (rcs_diffreg(path2, path3, d2) == D_ERROR)) { ! rcs_buf_free(diffb); ! diffb = NULL; ! goto out; ! } (void)xasprintf(&dp13, "%s/d13.XXXXXXXXXX", rcs_tmpdir); rcs_buf_write_stmp(d1, dp13, 0600);