use xstrdup rather than strdup in case of malloc failure.

This commit is contained in:
Peter Wemm 1997-05-17 14:14:47 +00:00
parent e7905b1443
commit c5648cfb9a

View File

@ -4300,11 +4300,11 @@ RCS_setlocalid (arg)
{
char *copy, *next, *key;
copy = strdup(arg);
copy = xstrdup(arg);
next = copy;
key = strtok(next, "=");
keywords[KEYWORD_LOCALID].string = strdup(key);
keywords[KEYWORD_LOCALID].string = xstrdup(key);
keywords[KEYWORD_LOCALID].len = strlen(key);
/* options? */
@ -4330,7 +4330,7 @@ RCS_setincexc (arg)
int include = 0;
struct rcs_keyword *keyword;
copy = strdup(arg);
copy = xstrdup(arg);
next = copy;
switch (*next++) {
case 'e':