diff options
Diffstat (limited to 'contrib/cvs/src/modules.c')
-rw-r--r-- | contrib/cvs/src/modules.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/cvs/src/modules.c b/contrib/cvs/src/modules.c index a784a86..eed551e 100644 --- a/contrib/cvs/src/modules.c +++ b/contrib/cvs/src/modules.c @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>, + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License * as specified in the README file that comes with the CVS source @@ -131,7 +136,6 @@ my_module (db, mname, m_type, msg, callback_proc, where, shorten, char *mwhere = NULL; char *mfile = NULL; char *spec_opt = NULL; - char *xvalue = NULL; int alias = 0; datum key, val; char *cp; @@ -371,6 +375,7 @@ my_module (db, mname, m_type, msg, callback_proc, where, shorten, /* mwhere gets just the module name */ mwhere = xstrdup (mname); mfile = cp + 1; + assert (strlen (mfile)); /* put the / back in mname */ *cp = '/'; @@ -744,7 +749,7 @@ module `%s' is a request for a file in a module which is not a directory", err += run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); free (expanded_path); } - free (real_prog); + if (real_prog) free (real_prog); } } @@ -765,8 +770,6 @@ module `%s' is a request for a file in a module which is not a directory", if (value != NULL) free (value); - if (xvalue != NULL) - free (xvalue); return (err); } |