Fix build error on gcc platforms

Approved by:	bapt (mentor)
This commit is contained in:
Allan Jude 2015-09-05 19:28:41 +00:00
parent 1f8577e633
commit 3491f5d422
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287491

View File

@ -131,6 +131,7 @@ kstack_cleanup_encoded(const char *old, char *new, int kflag)
cp_new++;
}
}
*cp_new = '\0';
cp_tofree = cp_loop = strdup(new);
} else
cp_tofree = cp_loop = strdup(old);
@ -138,7 +139,6 @@ kstack_cleanup_encoded(const char *old, char *new, int kflag)
if (strlen(cp_line) != 0 && *cp_line != 127)
xo_emit("{le:token/%s}", cp_line);
}
*cp_new = '\0';
free(cp_tofree);
}