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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user