- Remove some useless variable initializations.

- Make some conditional free()'s where the condition was always true
  unconditional.
This commit is contained in:
John Baldwin 2006-06-20 19:32:10 +00:00
parent 15a901e263
commit 73a2437a83

View file

@ -345,7 +345,6 @@ linker_load_file(const char *filename, linker_file_t *result)
lf->refs++;
return (0);
}
lf = NULL;
foundfile = 0;
error = 0;
@ -894,7 +893,7 @@ kldfind(struct thread *td, struct kldfind_args *uap)
char *pathname;
const char *filename;
linker_file_t lf;
int error = 0;
int error;
#ifdef MAC
error = mac_check_kld_stat(td->td_ucred);
@ -916,8 +915,7 @@ kldfind(struct thread *td, struct kldfind_args *uap)
else
error = ENOENT;
out:
if (pathname)
free(pathname, M_TEMP);
free(pathname, M_TEMP);
mtx_unlock(&Giant);
return (error);
}
@ -1789,8 +1787,7 @@ linker_load_module(const char *kldname, const char *modname,
*lfpp = lfdep;
} while (0);
out:
if (pathname)
free(pathname, M_LINKER);
free(pathname, M_LINKER);
return (error);
}