=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.126 retrieving revision 1.127 diff -c -r1.126 -r1.127 *** src/usr.bin/cvs/file.c 2005/10/27 00:24:24 1.126 --- src/usr.bin/cvs/file.c 2005/11/12 21:34:48 1.127 *************** *** 1,4 **** ! /* $OpenBSD: file.c,v 1.126 2005/10/27 00:24:24 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: file.c,v 1.127 2005/11/12 21:34:48 niallo Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 42,48 **** #include "cvs.h" #include "file.h" #include "log.h" - #include "strtab.h" #define CVS_IGN_STATIC 0x01 /* pattern is static, no need to glob */ --- 42,47 ---- *************** *** 1031,1040 **** CVSFILE *child; if (cf->cf_name != NULL) ! cvs_strfree(cf->cf_name); if (cf->cf_dir != NULL) ! cvs_strfree(cf->cf_dir); if (cf->cf_type == DT_DIR) { if (cf->cf_root != NULL) --- 1030,1039 ---- CVSFILE *child; if (cf->cf_name != NULL) ! free(cf->cf_name); if (cf->cf_dir != NULL) ! free(cf->cf_dir); if (cf->cf_type == DT_DIR) { if (cf->cf_root != NULL) *************** *** 1048,1056 **** } } else { if (cf->cf_tag != NULL) ! cvs_strfree(cf->cf_tag); if (cf->cf_opts != NULL) ! cvs_strfree(cf->cf_opts); } free(cf); --- 1047,1055 ---- } } else { if (cf->cf_tag != NULL) ! free(cf->cf_tag); if (cf->cf_opts != NULL) ! free(cf->cf_opts); } free(cf); *************** *** 1162,1168 **** SIMPLEQ_INIT(&(cfp->cf_files)); } ! cfp->cf_name = cvs_strdup(basename(path)); if (cfp->cf_name == NULL) { cvs_log(LP_ERR, "failed to copy file name"); cvs_file_free(cfp); --- 1161,1167 ---- SIMPLEQ_INIT(&(cfp->cf_files)); } ! cfp->cf_name = strdup(basename(path)); if (cfp->cf_name == NULL) { cvs_log(LP_ERR, "failed to copy file name"); cvs_file_free(cfp); *************** *** 1172,1178 **** if ((p = strrchr(path, '/')) != NULL) { *p = '\0'; if (strcmp(path, ".")) { ! cfp->cf_dir = cvs_strdup(path); if (cfp->cf_dir == NULL) { cvs_log(LP_ERR, "failed to copy directory"); --- 1171,1177 ---- if ((p = strrchr(path, '/')) != NULL) { *p = '\0'; if (strcmp(path, ".")) { ! cfp->cf_dir = strdup(path); if (cfp->cf_dir == NULL) { cvs_log(LP_ERR, "failed to copy directory"); *************** *** 1277,1283 **** if (ent->ce_type == CVS_ENT_FILE) { if (ent->ce_tag[0] != '\0') { ! cfp->cf_tag = cvs_strdup(ent->ce_tag); if (cfp->cf_tag == NULL) { cvs_file_free(cfp); return (NULL); --- 1276,1282 ---- if (ent->ce_type == CVS_ENT_FILE) { if (ent->ce_tag[0] != '\0') { ! cfp->cf_tag = strdup(ent->ce_tag); if (cfp->cf_tag == NULL) { cvs_file_free(cfp); return (NULL); *************** *** 1285,1291 **** } if (ent->ce_opts[0] != '\0') { ! cfp->cf_opts = cvs_strdup(ent->ce_opts); if (cfp->cf_opts == NULL) { cvs_file_free(cfp); return (NULL); --- 1284,1290 ---- } if (ent->ce_opts[0] != '\0') { ! cfp->cf_opts = strdup(ent->ce_opts); if (cfp->cf_opts == NULL) { cvs_file_free(cfp); return (NULL);