diff options
author | Andreas Schneider <asn@samba.org> | 2019-05-20 16:21:00 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-05-24 07:23:42 +0000 |
commit | 5dfbb0d24dc572e18906cc4acfd95ab43a8567aa (patch) | |
tree | f4a07caadd540edc084adc4de06c4193435cc7db /source3/lib | |
parent | de926429413f2440d185681586427a9e77c81a7f (diff) | |
download | samba-5dfbb0d24dc572e18906cc4acfd95ab43a8567aa.tar.gz |
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
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/popt_common_cmdline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/popt_common_cmdline.c b/source3/lib/popt_common_cmdline.c index 95abec1a440..79e34847f48 100644 --- a/source3/lib/popt_common_cmdline.c +++ b/source3/lib/popt_common_cmdline.c @@ -198,6 +198,10 @@ void popt_burn_cmdline_password(int argc, char *argv[]) for (i = 0; i < argc; i++) { p = argv[i]; + if (p == NULL) { + return; + } + if (strncmp(p, "-U", 2) == 0) { ulen = 2; found = true; @@ -207,10 +211,6 @@ void popt_burn_cmdline_password(int argc, char *argv[]) } if (found) { - if (p == NULL) { - return; - } - if (strlen(p) == ulen) { continue; } |