=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/util.c,v retrieving revision 1.157 retrieving revision 1.158 diff -c -r1.157 -r1.158 *** src/usr.bin/cvs/util.c 2015/01/16 06:40:07 1.157 --- src/usr.bin/cvs/util.c 2015/11/05 09:48:21 1.158 *************** *** 1,4 **** ! /* $OpenBSD: util.c,v 1.157 2015/01/16 06:40:07 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink --- 1,4 ---- ! /* $OpenBSD: util.c,v 1.158 2015/11/05 09:48:21 nicm Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink *************** *** 239,249 **** if (error != 0) { /* ditch the argument vector */ for (i = 0; i < (u_int)argc; i++) ! xfree(argv[i]); argc = -1; } ! xfree(linebuf); return (argc); } --- 239,249 ---- if (error != 0) { /* ditch the argument vector */ for (i = 0; i < (u_int)argc; i++) ! free(argv[i]); argc = -1; } ! free(linebuf); return (argc); } *************** *** 284,291 **** int i; for (i = 0; i < argc; i++) ! if (argv[i] != NULL) ! xfree(argv[i]); } /* --- 284,290 ---- int i; for (i = 0; i < argc; i++) ! free(argv[i]); } /* *************** *** 648,661 **** ent = cvs_ent_open(rpath); cvs_ent_add(ent, entry); ! xfree(entry); if (p != NULL) *p = '/'; } } ! xfree(dir); } void --- 647,660 ---- ent = cvs_ent_open(rpath); cvs_ent_add(ent, entry); ! free(entry); if (p != NULL) *p = '/'; } } ! free(dir); } void *************** *** 696,702 **** fatal("cvs_mkdir: %s: %s", rpath, strerror(errno)); } ! xfree(dir); } /* --- 695,701 ---- fatal("cvs_mkdir: %s: %s", rpath, strerror(errno)); } ! free(dir); } /* *************** *** 741,751 **** while ((lp = TAILQ_FIRST(&(lines->l_lines))) != NULL) { TAILQ_REMOVE(&(lines->l_lines), lp, l_list); if (lp->l_needsfree == 1) ! xfree(lp->l_line); ! xfree(lp); } ! xfree(lines); } /* --- 740,750 ---- while ((lp = TAILQ_FIRST(&(lines->l_lines))) != NULL) { TAILQ_REMOVE(&(lines->l_lines), lp, l_list); if (lp->l_needsfree == 1) ! free(lp->l_line); ! free(lp); } ! free(lines); } /* *************** *** 784,792 **** void cvs_argv_destroy(struct cvs_argvector *av) { ! xfree(av->str); ! xfree(av->argv); ! xfree(av); } u_int --- 783,791 ---- void cvs_argv_destroy(struct cvs_argvector *av) { ! free(av->str); ! free(av->argv); ! free(av); } u_int