2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Fix some potential problems found by the clang static analyzer,

none serious.
This commit is contained in:
Todd C. Miller
2011-07-28 10:59:37 -04:00
parent 6365c779c0
commit 4f9a93f658
7 changed files with 55 additions and 36 deletions

View File

@@ -4,7 +4,7 @@
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /home/cvs/openbsd/src/usr.bin/lex/flex.skl,v 1.11 2010/08/04 18:24:50 millert Exp $
* $Header: /cvs/src/usr.bin/lex/flex.skl,v 1.11 2010/08/04 18:24:50 millert Exp $
*/
#define FLEX_SCANNER
@@ -3609,8 +3609,10 @@ parse_include(char *base)
/* Make a copy of path and return it. */
len += (int)(ep - cp);
if ((path = malloc(len + 1)) == NULL)
if ((path = malloc(len + 1)) == NULL) {
yyerror(_("unable to allocate memory"));
return NULL;
}
if (subst) {
/* substitute for %h */
char *pp = path;