relative: Fix potential NULL dereference (ALT#14067)

This commit is contained in:
Дмитрий Левин 2008-01-17 18:12:07 +00:00
parent aa45567317
commit d534994b4e

View File

@ -106,9 +106,7 @@ main(int ac, char *av[])
{
const char *orig_what;
char *what_p, *to_p, *res;
char *what = xstrdup(av[1]);
char *to = xstrdup(av[2]);
char *what, *to;
if (ac < 3)
{
@ -117,6 +115,9 @@ main(int ac, char *av[])
return 1;
}
what = xstrdup(av[1]);
to = xstrdup(av[2]);
orig_what = normalize(av[1]);
normalize(av[2]);