lib: Make dom_sid_parse_endp init "endp" on all "ok" paths
authorVolker Lendecke <vl@samba.org>
Thu, 1 Dec 2016 16:15:29 +0000 (16:15 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 6 Dec 2016 19:24:22 +0000 (20:24 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/security/dom_sid.c

index 8b30ee67eea9e5a4854e3a56e35858a0236e8306..5454c514c945ddfa71c134aa5bbbbc765bb7390a 100644 (file)
@@ -172,7 +172,7 @@ bool dom_sid_parse_endp(const char *sidstr,struct dom_sid *sidout,
        sidout->num_auths = 0;
        if (*q != '-') {
                /* Just id_auth, no subauths */
-               return true;
+               goto done;
        }
 
        q++;
@@ -200,6 +200,7 @@ bool dom_sid_parse_endp(const char *sidstr,struct dom_sid *sidout,
                }
                q += 1;
        }
+done:
        if (endp != NULL) {
                *endp = q;
        }