Merge branch 'bc/run-command-nullness-after-free-fix' into maint
C pedantry ;-) fix. * bc/run-command-nullness-after-free-fix: run-command: avoid undefined behavior in exists_in_PATH
This commit is contained in:
commit
c17cf77e4e
@ -213,8 +213,9 @@ static char *locate_in_PATH(const char *file)
|
|||||||
static int exists_in_PATH(const char *file)
|
static int exists_in_PATH(const char *file)
|
||||||
{
|
{
|
||||||
char *r = locate_in_PATH(file);
|
char *r = locate_in_PATH(file);
|
||||||
|
int found = r != NULL;
|
||||||
free(r);
|
free(r);
|
||||||
return r != NULL;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sane_execvp(const char *file, char * const argv[])
|
int sane_execvp(const char *file, char * const argv[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user