mirror of
https://github.com/samba-team/samba.git
synced 2025-02-10 13:57:47 +03:00
s3:lib: Move up NULL check
Found by covscan. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri May 24 07:23:42 UTC 2019 on sn-devel-184
This commit is contained in:
parent
de92642941
commit
5dfbb0d24d
@ -198,6 +198,10 @@ void popt_burn_cmdline_password(int argc, char *argv[])
|
|||||||
|
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
p = argv[i];
|
p = argv[i];
|
||||||
|
if (p == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (strncmp(p, "-U", 2) == 0) {
|
if (strncmp(p, "-U", 2) == 0) {
|
||||||
ulen = 2;
|
ulen = 2;
|
||||||
found = true;
|
found = true;
|
||||||
@ -207,10 +211,6 @@ void popt_burn_cmdline_password(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (found) {
|
if (found) {
|
||||||
if (p == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen(p) == ulen) {
|
if (strlen(p) == ulen) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user